public void AddQuestion( Document document, Question question )
Add a question to the document
Syntax
public void AddQuestion( Document document, Question question )
Parameters
- document
- Type: Document
Document the question will be added to. Object. Access path: PublicAPI.Docflow.Document
- question
- Type: Question
Question. Object. Access path: PublicAPI.Portal.Objects.Tasks.Question
Examples
//load a document by ID var doc = PublicAPI.Docflow.Document.Load(3); //create a question var question = PublicAPI.Portal.Objects.Tasks.Question.Create(); question.RefObject = new ReferenceOnEntity {Object = doc}; question.Subject = doc.Name; //load the user by ID question.Executor = PublicAPI.Portal.Security.User.Load(3); question.Description = "Question description"; question.ShowAll = true; question.Status = TaskBaseStatus.NewOrder; question.Save(); //ask the question PublicAPI.Docflow.Document.AddQuestion(doc, question);
See Also