Is there any programmatic method for deleting IChecklistTask and IRequestedTask items? If not, will this functionality be implemented in future revisions of SoftPro?
Thanks,
Deleting Checklist and Requested Tasks
Moderator: Phil Barton
-
- Posts: 54
- Joined: Wed Sep 24, 2008 2:37 pm
- Location: Raleigh, NC
- Contact:
Re: Deleting Checklist and Requested Tasks
The ChecklistTask and RequestedTask collections on the IOrder interface include a Remove(..) method and a RemoveAt(...) method. The Remove method takes as its parameter the object to remove; the RemoveAt method takes as its parameter the index into the collection of the object to remove. The following code snippets show how to use the Remove(...) method for IRequestedTask objects (IChecklistTask objects will follow the same pattern):
C#
VB
C#
Code: Select all
IRequestedTask task1 = order.RequestedTask.CreateNew();
IRequestedTask task2 = order.RequestedTask.CreateNew();
task1.Task = @"Task1";
task2.Task = @"Task2";
order.RequestedTask.Remove(task1);
Code: Select all
Dim task1 As IRequestedTask
Dim task2 As IRequestedTask
task1 = order.RequestedTask().CreateNew()
task2 = order.RequestedTask().CreateNew()
task1.Task() = "Task1"
task2.Task() = "Task2"
order.RequestedTask.Remove(task1)
Phil Barton
Software Architect
SoftPro
Software Architect
SoftPro
Re: Deleting Checklist and Requested Tasks
Thanks Phil. Sorry, I don't know why I didn't see that method.
Have a great weekend,
Have a great weekend,
Robert