This method creates a new Approval Template for the approvals process and returns 0 (zero) to indicate success. This method raises an exception if the user does not have the authority to add an Approval Template, or if the record format is invalid.
ApprovaObjects have these keys and values:
In addition to the above keys, you must add all the approvers to the Template when you create it, as there is no other way to modify an Approval Template through the jxAPI once created. (However, you can modify the Approval Template through the normal web interface.) Backup approvers are optional but you must add a primary approver key (approver_1 for instance) for each "level" of approval.
For instance, if you gave "default2" for the bizid field, this indicates a 2-level approval process. This means that you must give 2 primary approvers, and 0 to 2 backup approvers.
The valid keys for Primary Approvers and Backup approvers are:
Again, the number of primary approvers must correspond exactly to the number of approval levels indicated by the bizid field. It is not possible to create an Approval Template through the jxAPI without specifying all the primary approvers.
You will get a ValueError exception if you are missing a primary approver.
| Name | Type | Description |
|---|---|---|
| skey | string | |
| new_rec | ApprovalObject |
The new approval plan record to add. |
The CreateApprovalPlan method returns zero (an integer).
© Copyright 1997-2007 Journyx