public void AddComment( Document document, string commentText, User commentAuthor, IEnumerable<DocumentAttachment> documentAttachments, IEnumerable<Attachment> attachments )
Add a comment to the document
Syntax
public void AddComment( Document document, string commentText, User commentAuthor, IEnumerable<DocumentAttachment> documentAttachments, IEnumerable<Attachment> attachments )
Parameters
- document
- Type: Document
Document, a comment will be added to. Object. Access path: PublicAPI.Docflow.Document
- commentText
- Type: System String
Comment (string)
- commentAuthor
- Type: User
Comment author. Object. Access path: PublicAPI.Portal.Security.User
- documentAttachments
- Type: System.Collections.Generic IEnumerable DocumentAttachment
Attached Documents. Object. Access path: PublicAPI.Docflow.Objects.DocumentAttachment
- attachments
- Type: System.Collections.Generic IEnumerable Attachment
Attachments. Object. Access path: PublicAPI.Portal.Objects.Common.Attachment
Examples
//load the document by ID var doc = PublicAPI.Docflow.Document.Load(3); //load the user by ID var commentAuthor = PublicAPI.Portal.Security.User.Load(3); //create attachments (a link to creating attachments is in the end of the article) var attachments = context.Attachments; //create attached documents var documentAttachments = context.DocumentAttachments; //add the comment PublicAPI.Docflow.Document.AddComment(doc, commentText, commentAuthor, documentAttachments, attachments);
See Also