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)
Refile not propagating Profile information in folders under Tabs
NAYLAND
Hi.
I have a routine that refiles a workspace :-
public static void RefileWorkspace(IManWorkspace workspaceToRefile)
{
// Invoke IManRefileCmd to inherit the workspace document profile.
ContextItems context = new ContextItemsClass();
IManRefileCmd cmd = new IManRefileCmdClass();
context.Add("SelectedIManObject", workspaceToRefile); //re-file the parent folder to push its profile values down to the children folders.
context.Add("IManExt.ConfirmIndividuals", true);
context.Add("ConfirmMessages", false);
context.Add("RefreshFolderContents", true);
context.Add("IManExt2.RefileNoUI", false); //true is silent re-filing.
cmd.Initialize(context);
cmd.Update();
cmd.Execute();
}
This works fine if I supply a workspace that consists just of folders - Attachment 1. The profile of the workspace is propagated down to all the other folders
However if the workspace contains a Tab then no refile occurs in the folders below the Tabs. In the Attachment 2 the refile in the Correspondence Folder has all the correct profile information, however that’s the only folder that does. The folder Proposals under the Pre-Engagement Tab does not get the profile information.
If I use the right click Refile option as supplied by Interwoven however the profile information does get propagated down the structure to all files.
How can I do this programmatically?
Cheers!
Find more posts tagged with
Comments
Migrateduser
Hi,
I'm not sure if this will help, but I took a different approach. In my scenario, I need to programmatically set security and not modify profile information.
I only use the imanage.dll.
So, I perform a search to return all folders underneath a workspace:
//Search for all workspace folders
IManFolderSearchParameters fsp = null;
IManWorkArea wa = (IManWorkArea)sess.WorkArea;
fsp = (IManFolderSearchParameters)dms.CreateFolderSearchParameters();
fsp.Add(imFolderAttributeID.imFolderRootFolderID, dmsWorkspace.FolderID.ToString());
ManStrings ms = new ManStrings();
ms.Add(db.Name);
IManFolders folders = wa.SearchFolders(ms, fsp);
//Then I loop through all folders and test for folder types
//set document security per folder
foreach (IManFolder folder in folders) {
//do some code...
if (folder.ObjectType.ObjectType.Equals(imObjectType.imTypeDocumentFolder))
{//do some code}
}