Call a workflow rule from the view
Call a workflow rule from the view
Technologies > User Interface Add-Ins > Parts for Reports > Per-row Workflow Rule Invocation
The following example calls a workflow rule from a per-row button. The command type
workflowRule
is used and the
ruleId
is either supplied as
primaryActivity-workflowRuleName
or
primaryActivity-workflowRuleName-methodName
, if the workflow rule is defined using class-level security:
<field controlType="button">
<title>Verify</title>
<command type="workflowRule" ruleId="AbSolutionsViewExamples-LogicExamples-verifyAction"/>
A workflow rule may be called in conjuction with the saveForm command ( saveForm ). The following workflow rule creates a new Help Desk request in the activity_log table and sets the status field to PLANNED:
<command type="saveForm" workflowRuleId="AbSolutionsWorkflow-helpDeskPlanRequest"/>
The
workflowRule
command automatically sends
the data record to the workflow rule and can then update the selected record,
find related records from other tables, or perform any other processing:
public void verifyAction(DataRecord pkRecord) {
Object activityLogId = pkRecord.getValue("activity_log.activity_log_id");
To process multiple records using the
workflowRule
command from the view,
Send multiple records to a workflow rule
A workflow rule may also be called using JavaScript,