public void AddQuestion( ProjectTask projectTask, User recipient, string description, bool showAll, IEnumerable<Attachment> attachments )
Ask a question to a project task
Syntax
public void AddQuestion( ProjectTask projectTask, User recipient, string description, bool showAll, IEnumerable<Attachment> attachments )
Parameters
- projectTask
- Type: ProjectTask
Project task, the question is asked to. Object. Access path: PublicAPI.Projects.ProjectTask
- recipient
- Type: User
Recipient (who is asked the question). Object. Access path: PublicAPI.Portal.Security.User
- description
- Type: System String
Description (question text)
- showAll
- Type: System Boolean
Show to everyone
- attachments
- Type: System.Collections.Generic IEnumerable Attachment
Attachments. Object. Access path: PublicAPI.Portal.Objects.Common.Attachment
Remarks
Examples
//load the necessary data var projectTask = PublicAPI.Projects.ProjectTask.Load(3); //load the project task by ID var recipient = PublicAPI.Portal.Security.User.Load(3); //load the user by ID var description = "Question description"; //description (question text) var attachmets = PublicAPI.Portal.Objects.Common.Attachment.Find(new Filter{Query = "Id in (2,3)"},null); //find all the attachments with the IDs 2 and 3, using the EQL search var showAll = true; //show to everyone (yes/no) //ask the question PublicAPI.Projects.ProjectTask.AddQuestion(projectTask, recipient, description, attachments, showAll);
See Also