public ApprovementTaskGroup SendToApprovement( Document document, IEnumerable<User> users, DateTime executionDate )
Send a document for approval to a list of users
Syntax
public ApprovementTaskGroup SendToApprovement( Document document, IEnumerable<User> users, DateTime executionDate )
Parameters
- document
- Type: Document
Document, sent for approval. Object. Access path: PublicAPI.Docflow.Document
- users
- Type: System.Collections.Generic IEnumerable User
Approval user group. Object. Access path: PublicAPI.Portal.Security.User
- executionDate
- Type: System DateTime
Approval task end date (optional parameter)
Return Value
Type: ApprovementTaskGroupApproval task group
Examples
//load the document by ID var doc = PublicAPI.Docflow.Document.Load(3); //create an empty list for users var userList = new List<IUser>(); //load users by IDs and add them to the list userList.Add(PublicAPI.Portal.Security.User.Load(3)); userList.Add(PublicAPI.Portal.Security.User.Load(4)); //set the approval task end date var executeDate = DateTime.Now.AddDays(4); //send for approval PublicAPI.Docflow.Tasks.SendToApprovement(doc, userList, executeDate); //WARNING!! If the approval task end date is not defined, then one day is added to the task creation date //The result is the approval task end date
See Also