Add a Task

Discussions related to custom development with Select.
Post Reply
Posts: 66
Joined: Fri Apr 24, 2015 10:33 am

Add a Task

Post by tmeisinger » Fri Apr 17, 2020 4:17 pm

I would like to add a Requested Task to an order during OrderSaving.
I thought it would be like an AdditionalTitleCharge, but I'm not able to CreateNew("Task").
Could you give me a little idea how best to work with Tasks.

Code: Select all

ISecurityIdentity AssignedTo = sm.Identities.Where(v => v.FullName == "Something").FirstOrDefault();

dynamic newTask = iOrder.CreateNew("Task");
newTask.Description = "something";
newTask.Status = TaskStatusType.Requested;
newTask.AssignedTo = AssignedTo;

Posts: 917
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC

Re: Add a Task

Post by BobRichards » Fri Apr 17, 2020 8:57 pm

That is really close! You must create a new "ChecklistTask" or "RequestedTask" and add it to the Tasks collection like you are doing.
Bob Richards, Software Developer, SoftPro

Post Reply