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)
Error message when using IManWorkspace.Update()
Noble
Sometimes I get an error message when I try to use the Update() method.
This is the message I get:
Monday, January 17, 2005 Kl. 9:9:45 - AddMatterToWorkspace: Error -
[Folders ][Update ]The operation is not allowed. - 05-00304
And this is the code that causes the error:
imDB = imSession.PreferredDatabase;
imWorkspace = (IManWorkspace) imDB.Workspaces.ItemByIndex(1);
imWorkspace.SetAttributeByID(iManage.WorkSite.imProfileAttributeID.imProfileCustom4,jobId);
imWorkspace.Update();
Does anyone know why this operation is not allowed?
I this a better way to do it?
imDB = imSession.PreferredDatabase;
imWorkspace = (IManWorkspace) imDB.Workspaces.ItemByIndex(1);
if (imWorkspace.AdditionalProperties.ContainsByName("iMan___28"))
{
imWorkspace.AdditionalProperties.RemoveByName("iMan___28");
}
imWorkspace.AdditionalProperties.Add("iMan___28",matterId);
imWorkspace.Update();
Find more posts tagged with
Comments
jny
You should use the IManProfile.SetAttributeByID method instead, like so:
===========================================
// Get the workspace profile
IManProfile wsprofile = imWorkspace.Profile;
wsprofile.SetAttributeByID(iManage.WorkSite.imProfileAttributeID.imProfileCustom4,jobId);
// Or,
imWorkspace.Profile.SetAttributeByID(iManage.WorkSite.imProfileAttributeID.imProfileCustom4,jobId);
imWorkspace.Update();
===========================================
The only reason document folders rely on AdditionalProperties to adhere profile attributes is because a folder does not inherit IManProfiledFolder as a workspace does. IManWorkspace is the only WorkSite folder object currently inherits IManProfileFolder -- which essentially associates to an IManProfile.