You are viewing limited content. For full access, please sign in.

Question

Question

Documents Created via SDK Document.Create are not triggering Entry Create

asked on May 28, 2015 Show version history

Hi,

Potentially a quick question. We are currently importing documents from a folder via the SDK:

int NewDocID = Document.Create(_docFileDstPath + _docFileName, "DEFAULT", EntryNameOption.AutoRename, RASession);
                            DocumentImporter DI = new DocumentImporter();
                            DI.Document = Document.GetDocumentInfo(NewDocID, RASession);

                            DI.ImportImages(sftpPath + _docFileName.ToString());
                            DI.Document.SetTemplate(_docTemplate, FVC);
                            DI.Document.Save();
                            DI.Document.Dispose();
                            RASession.LogOut();

 

Now, the document is created in Laserfiche, and has all the correct data and everything. However, looking through the Subscriber Traceer, documents brought in this way do not have an Entry Create associated with it. Is there something we are missing here? Is there a way to have the Entry Create event triggered?

 

Currently the workflows are setup to start on Entry Create, as a work around I added Entry Change, but then it sends multiple emails.

 

Thanks!

2 0

Answer

SELECTED ANSWER
replied on May 28, 2015

Try using DocumentInfo.Create, then use that DocumentInfo to import the images. This keeps the entry locked until you call Dispose(), at which point the entry creation event should be triggered.

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.