I am trying to use SDK script to create document in repository and I use the below code. It always says "Entry not found [9001] error. Any help would be great. Thanks.
Document.Create(@"Path","DEFAULT",EntryNameOption.None,RASession);
I am trying to use SDK script to create document in repository and I use the below code. It always says "Entry not found [9001] error. Any help would be great. Thanks.
Document.Create(@"Path","DEFAULT",EntryNameOption.None,RASession);
What is the path set to? Do all the folders in the path exist?
If you plan on doing other things to this document immediately, like setting pages, you probably want to use DocumentInfo.Create instead so you get a lock on the document. See the "Document Organization" section in the SDK help file for an example.
Thanks
For those of you like me that got here and needed more information, this worked for me:
FolderInfo folderInfo = Folder.GetFolderInfo("\\path_to_folder", RASession); DocumentInfo document = new DocumentInfo(RASession); document.Create(folderInfo, fileName, EntryNameOption.AutoRename);
I also had originally included my Repository name in the path (which was the reason I was getting the Entry not found [9001] error, but it makes more sense that it has to do with the path when you get that error on the GetFolderInfo line).
For more, see this answer: https://answers.laserfiche.com/questions/49295/Using-RA-to-create-a-document-assign-a-template-and-populate-fields#49329
The code here also works but you need to have a trailing slash for the path name: https://answers.laserfiche.com/questions/77942/Documents-Created-via-SDK-DocumentCreate-are-not-triggering-Entry-Create#repliestomain