Revision history:
Introduced in QPR 7.5.1
Last Changed in QPR 2022.1
Creates a new action. Note that actions created with this command are not connected to any parent element by default.
Synopsis:
Actions.Create(ActionType, Header, Description, Parameters, out ActionId)
Parameters:
ActionType: String | Integer. Either the name or identifier of an action type. The valid types are as follows:
•Comment = 1
•Lesson = 2
•Action Plan = 3
•Document = 4
•Embedded attachment = 6 (note: cannot be created as a standalone action, but needs to be connected to a parent action)
•Linked attachment = 7 (note: cannot be created as a standalone action, but needs to be connected to a parent action)
•Risk = 14
•Strategy Item = 15
•<name of a customized action type> = <DatabaseId defined for the action type in actiontypes.ini>
Header: String. Header of the action.
Description: String. Description of the action.
Parameters:
•ParentAction: Integer. ID of the parent action.
out ActionId: Variant for storing the id of the new action created with this function call.
Required Rights:
At least modify rights to QPR Portal.
Return Values:
Below are listed the return values that this function can return:
RV_SUCCESS
RV_UNKNOWN_ERROR
RV_INVALID_PARAMETER
RV_ACCESS_DENIED
RV_APPLICATION_QUIT_CALLED
RV_NOT_CONNECTED_TO_SERVER
RV_NOT_AUTHENTICATED
Example Procedure:
iRet = PGApplication.Actions.Create(3, "New action plan", "Created by a QPR Script", "", iId)