ActionItem Class Methods
In this section, the ActionItem class methods are presented in alphabetical order.
Syntax
delete()
Description
Use this method to delete the current action item.
Parameters
None.
Returns
A Boolean value: True if the deletion was successful, False otherwise.
Syntax
getAssignments()
Description
Use the getAssignments method to obtain the action item assignments (user/role) as a collection object.
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
None.
Returns
A PTAI_COLLECTION:Collection object containing user or role assignments data for the action item.
Example
import PTAI_ACTION_ITEMS:ActionItem;
import PTAI_COLLECTION:Collection;
Local PTAI_ACTION_ITEMS:ActionItem &item;
Local PTAI_COLLECTION:Collection &oAssignmentColl = create PTAI_COLLECTION:Collection();
&item = create PTAI_ACTION_ITEMS:ActionItem();
/*Pass an action item id*/
&item.open(&item_id);
&oAssignmentColl = &item.getAssignments();
Syntax
new(item_ID, title, list_ID)
Description
Use this method to create and initialize a new action item.
Parameters
Field or Control |
Definition |
---|---|
item_ID |
Specifies the ID for the new action item as a string. |
title |
Specifies the title for the new action item as a string. Note: The title is also referred to as the Label property. |
list_ID |
Specifies the activity guide to which the action item belongs as a string. |
Returns
None.
Syntax
nextAction()
Description
Use this method to return the next detail action item in the activity guide that is assigned and is not cancelled or on hold.
Parameters
None.
Returns
An ActionItem object.
Syntax
open(item_ID)
Description
Use this method to retrieve the specified action item definition from the database and set the properties.
Parameters
Field or Control |
Definition |
---|---|
item_ID |
Specifies the action item ID as a string. |
Returns
None.
Syntax
prevAction()
Description
Use this method to return the previous detail action item in the activity guide that is assigned and is not cancelled or on hold.
Parameters
None.
Returns
An ActionItem object.
Syntax
save()
Description
Use this method to save the current action item definition to the database. If this is a new activity guide, then the definition is inserted into the database; otherwise, an existing definition is updated in the database.
Parameters
None.
Returns
A Boolean value: True if the save is successful, False otherwise.
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
Field or Control |
Definition |
---|---|
&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);