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)
CheckIn Document Where is my Document
Bob1
Hi,
I am trying to set the location of where I check in a document however have been unsuccessful. What attribute do i need to set inorder to set the folder in which the document should be checked in to?
// Create new document
IManDatabase database = sourceDocument.Database;
IManDocument newDocument = database.CreateDocument();
newDocument.SetAttributeByID(imProfileAttributeID.imProfileOperator, sourceDocument.Operator);
newDocument.SetAttributeByID(imProfileAttributeID.imProfileAuthor, sourceDocument.Author);
newDocument.SetAttributeByID(imProfileAttributeID.imProfileClass, sourceDocument.Class);
newDocument.SetAttributeByID(imProfileAttributeID.imProfileType, sourceDocument.Type);
newDocument.SetAttributeByID(imProfileAttributeID.imProfileComment, comments.ToString());
newDocument.SetAttributeByID(imProfileAttributeID.imProfileCustom26, true);
newDocument.SetAttributeByID(imProfileAttributeID.imProfileDescription, "Hello");
newDocument.SetAttributeByID(imProfileAttributeID.imProfileLocation, (IManDocumentFolder)sourceDocument.Folders.ItemByIndex(1));
newDocument.SetAttributeByID(imProfileAttributeID.imProfileName, "HelloName");
object errors = null;
newDocument.CheckIn(newSectionPath, imCheckinDisposition.imCheckinNewDocument,
imCheckinOptions.imDontKeepCheckedOut, ref errors);
newDocument.Update();
newDocument.LockContent(true);
Cheers for any help
Bob1
Find more posts tagged with
Comments
jny
Use the ImportCmd, which I believe an example is already posted somewhere in the Forum. Try searching for it first.
Bob1
Hi,
I have tried the ImportCmd however I get those permission errors as described in previous posts (The import actually works however the errors keep poping up):
IManExt: Error occurred when try to log the event!
Access is denied.
IManExt: The document was imported to the database, but could not be added to the folder.
IManExt.LogRuleEventsCmd.1: Error occurred when try to log the event!
IManExt.LogRuleEventsCmd.1: Access is denied.
Error occurred when try to log the event!
However, I did find a solution on how to find out how to add a document to a particular folder location. You need to get a reference to the folder you want to add the document to. Cast it to a IManDocumentFolder and then call the IManDocumentFolder.AddDocumentReference(IManDocument document) method to add the document (Followed by a IManDocumentFolder.Update() method). This worked perfectly!
Thank you for your contribution jny!
Cheers,
Bob1