Home
TeamSite
Cannot call CreateDocument due to Flat Space Filing Restrictions
System
I'm trying to create a document in the DMS, set some attributes, then check it in. This worked great until we disallowed flat-space filing. Now I have to specify a workspace folder before I can save, but I can't seem to figure out how to do so.
With flat space filing allowed, I can create the document, then add it to the appropriate folder, but with this disallowed, I need to do both at once.
Here is the relevant portion of my code:
-------------------------------
lcDoc = mcDatabase.CreateDocument()
lcDoc.Security.DefaultVisibility = imSecurityType.imView
lcDoc.Security.GroupACLs.Add("INFORMATION_TECHNOLOGY", imAccessRight.imRightAll)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileDescription, FileName)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileAuthor, msUserID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileOperator, msUserID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileType, "ANSI")
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileClass, "ADMIN")
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom1, ClientID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom2, MatterID)
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom10, "060")
lcDoc.Profile.SetAttributeByID(imProfileAttributeID.imProfileCustom14, DMSServerName)
' Fails here with error: [Folder ][AddDocument ]Operation requested on a record that does not exist.
DirectCast(loFolder, NRTFolder).AddDocument(DirectCast(lcDoc, NRTDocument))
' If I comment out the line above, this line returns a failure:
' This operation is currently not available due to flatspace filing restrictions.
Dim lcResults As IManCheckinResult = lcDoc.CheckInWithResults(lsFilePath, imCheckinDisposition.imCheckinNewDocument, imCheckinOptions.imDontKeepCheckedOut)
-------------------------------
Thanks for your help!
Find more posts tagged with
Comments
Migrateduser
Kevin
I'm not sure if you've managed to resolve this but we had the same problem which got introduced with a 9 server back end. The only way we managed to resolve it was to re-program the document import to use
IMANEXTLib.ImportCmd
and pass it the contextitem pair "DestinationObject", iFldr
where ifldr is an imanage.imandocumentfolder
Paul.