Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
COM Objects: Find out where Subscription Folder points to?
wolfixx
Hi Devnet Team,
I have some questions regarding Subscriptions (mainly about Workspaces in My Matter). The creation (incl. Categories) is well described in the COM Reference Manual.
What I can’t find but I would need it:
- How do I find out where a Subscription Folder points to? I need the Workspace FolderID (mhgroup.projects/refernece_prj_id)
- How can i search for subscription folder which point to a certain Workspace ID, because I want to delete or modify them.
Thanks in advance
Wolfgang
Find more posts tagged with
Comments
jny
If you are logged in as that user, this is how you may get the workspace folderID of a shortcut under their MyMatters:
[C#]
string strServer = "";// server name
// Login to a dms
IManDMS oDMS = new ManDMSClass();
IManSession oSess = oDMS.Sessions.Add(strServer);
oSess.TrustedLogin();
// Get current user's MyMatters subscription folder
IManSubscriptionFolderShortcuts shortcuts = (IManSubscriptionFolderShortcuts)oSess.WorkArea.SubscriptionFolder.SubFolders;
IManFolderShortcut shortcut = null;
IManFolder actualFolder = null;
for (int i = 1; i <= shortcuts.Count; i++)
{
if (shortcuts.ItemByIndex(i).ObjectType.ObjectType == imObjectType.imTypeFolderShortcut)
{
shortcut = (IManFolderShortcut)shortcuts.ItemByIndex(i);
actualFolder = shortcut.Resolve();
if (actualFolder.ObjectType.ObjectType == imObjectType.imTypeWorkspace)
{
//Cast to an IManWorkspace Object
IManWorkspace ws = (IManWorkspace)actualFolder.Workspace;
MessageBox.Show("Workspace has folderID: " + ws.FolderID);
//Cleanup pointer for the next guy.
ws = null;
}
shortcut = null;
actualFolder = null;
}
}
I'm not clear on your second request. Do you mean that you have a workspace id and you would like to find out the subscription folder to which that workspace belongs, then remove or edit the subscription folder? Or, you want to remove or modify that workspace?