saveAssignments method: ActionItem class

Syntax

saveAssignments(&AssignmentColl)

Description

Use the saveAssignments method to save or update action item assignments. If you are adding new user assignments to an action item, use the getAssignments method to get the existing assignments as a collection object, insert new assignments to the returned collection object, and call the saveAssignments method with the updated collection object as input.

Note:

While you can specify any user ID or role, only a user or role that has also been assigned Contributor privileges on the template or instance Security page will be allowed to complete the action item. The system will not validate your selection against the users or roles defined on the Security page.

Parameters

Parameter Description

&AssignmentColl

Specifies the user or role assignment data for the action item as a PTAI_COLLECTION:Collection object.

Returns

None.

Example

import PTAI_ACTION_ITEMS:ActionItem;
import PTAI_COLLECTION:Collection;
import PTAI_ACTION_ITEMS:ActionItemAssignments;
import PTAI_COLLECTION:Collectable;

Local PTAI_ACTION_ITEMS:ActionItem &item;
Local PTAI_COLLECTION:Collection &oAssignmentColl = create PTAI_COLLECTION:Collection();
Local PTAI_ACTION_ITEMS:ActionItemAssignments &oAssignment = create PTAI_ACTION_ITEMS:ActionItemAssignments();
&oAssignment.AssignType = "USER";
&oAssignment.AssignValue = %OperatorId;

&oAssignmentColl.InsertItem(&oAssignment As PTAI_COLLECTION:Collectable);

&item = create PTAI_ACTION_ITEMS:ActionItem();
/*Pass an action item id*/
&item.open(&item_id);
&item.saveAssignments(&oAssignmentColl);