Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
ShortCuts in MyMatters by Client/Matter
Duprat
Is there a way to look for ShortCuts, in "My Matters", that are from a specific Client/Matter?
I´m using the code from TechNote #52809 to find all the ShortCuts in the MyMatters collection from all users from all databases.
Set oparams = odms.CreateFolderSearchParameters
oparams.Add imFolderAttributeID.imFolderSubtype, "S"
oparams.Add imFolderAttributeID.imFolderParentID, "NULL"
Regards,
Carlos
Find more posts tagged with
Comments
jny
There isn't a way to search shortcuts by metadata. If you're attempting to find a specific shortcut by its client/matter, you would need to resolve the shortcut first then check its profile attribute value. Like so:
// Check results
if (othersMatters.Empty == false)
{
foreach (IManFolder oFolder in othersMatters)
{
oTypeFolder = oFolder.ObjectType.ObjectType;
if ((oFolder.IsRootLevelFolder == true) && (oTypeFolder == imObjectType.imTypeSubscriptionFolder))
{
oTarget = (IManSubscriptionFolder) oFolder;
//MessageBox.Show(oTarget.Owner.Name + "'s " + oTarget.Name + " is found. It has " + oTarget.SubFolders.Count.ToString() + " folders under it.");
foreach (IManFolder oItem in oTarget.SubFolders)
{
oTypeFolder = oItem.ObjectType.ObjectType;
if (oTypeFolder == imObjectType.imTypeFolderShortcut)
{
// Cast the folder to a folder shortcut.
IManFolderShortcut shortcut = (IManFolderShortcut) oItem;
// Resolve the folder shortcut to a workspace.
IManWorkspace ws = (IManWorkspace) shortcut.Resolve();
if (ws != null)
{
// Check whether this workspace contains the specified Client
if (ws.GetAttributeValueByID(imProfileAttributeID.imProfileCustom1).ToString() == "C10000")// Arbitrary example of a client value
MessageBox.Show("Workspace " + ws.Name.ToUpper() + " is profiled with Client C10000");
}
}
}
}
}
}
Duprat
It helped a lot.
Thank you so much.