CreateTasks

CreateTasks

Inputs (Array[]) inherits from EntityBase

Name

Type

Description

Mandatory

Available from version

Comment

Name

Type

Description

Mandatory

Available from version

Comment

User

Guid

The user that the task is associated to.

Yes

New method in 2.24

 

Assignee

Guid

If a certain admin or partner user should execute the task, this value is used.

 

 

Before version 2.27 Assignee was called Administrator. 

Heading

string

The heading of the task.

 

 

 

Text

string

The text of the task.

 

 

 

DueDate

DateTime

If the task has a due date this value is used.

 

 

 

IsHTML

bool

If the text of the task contains html this should be set to true.

 

 

 

Priority

string

Which priority the task should have. Allowed values are: "High", "Medium", "Low". Default are set to: "Medium".

 

 

 

Status

string

Which status the task should have. Allowed values are: "Created", "InProgress", "Done", "Closed". Default are set to "Created".

 

 

 

Response rows

Name

Type

Description

Available from version

Entities

Array

All tasks in the request is returned along with each tasks BrickId and array of Errors per task

 

 

 

 

 

Code examples

public static void CreateActivityLogTask() { var binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = Int32.MaxValue; var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx")); var req = new CreateTasksRequest(); req.Credentials = new bfsapi.Credentials { UserName = GetApiUserName(), Password = GetApiPassword() }; req.identify = GetApiIdentifier(); req.Entities = new[] { new bfsapi.CreateTask { Status = "Done", Heading = "TestHeading", IsHTML = true, Text = "Texting", User = Guid.NewGuid(), Administrator = Guid.NewGuid(), Priority = "Medium", CustomFields = new CustomField[] { new CustomField { FieldName = "TestField", Value = "TestValue" }, }, DueDate = DateTime.Today.AddDays(10) } }; var resp = target.CreateTasks(req); }