Creating a Custom Action
You can use the Salesforce Process Builder to create a custom action to be carried out on a declarative publication that you have created. You can specify an Apex action to be carried out on an object and add criteria associated with that object that determines when the action is to be carried out.
Creating an Immediate Custom Action
To create a custom action that is executed immediately:
- From Setup, click Create | Workflows & Approvals | Process Builder.
- Click New.
- Enter a process name.
- Enter a description of the process.
- Click Save.
- Click + Add Object
- Select the object for which you are creating the process.
- Select the criteria that determines when the process is started then click Save.
- Click + Add Criteria.
- Enter the criteria name.
- Select the criteria for executing actions:
- Conditions are met – The action runs when the conditions you provide are met. This is the default.
- Formula evaluates to true – The action runs when the formula you enter evaluates to true.
- No criteria – The action runs without meeting any conditions or formulas.
- Click Save.
- Click + Add Action.
- Select Apex from the Action picklist.
- Enter an action name.
- Select "Send FDN Messages Synchronously" from the Apex Salesforce's object-oriented, on-demand programming language. Class drop-down list.
- Copy the identifier of the publication that you are creating the action for and paste it into the Publication Value field.
- Select "Reference" from the Type drop-down list next to the Record ID field.
- Click the Record ID field then choose the Record ID field for the record that you are creating the custom action for.
- Click Save.
- Click Activate to activate the process.
Creating a Scheduled Custom Action
To create a scheduled custom action:
- From Setup, click Create | Workflows & Approvals | Process Builder.
- Click New.
- Enter a process name.
- Add a description of the process.
- Click Save.
- Click + Add Object.
- Select the object for which you are creating the process.
- Select the criteria that determines when the process is started then click Save.
- Click + Add Criteria.
- Enter the criteria name.
- Select the criteria for executing actions:
- Conditions are met – The action runs when the conditions you provide are met. This is the default.
- Formula evaluates to true – The action runs when the formula you enter evaluates to true.
- No criteria – The action runs without meeting any conditions or formulas.
- Click Save.
- Click + Add Action.
- Select Apex from the Action picklist.
- Enter an action name.
- Select "Send FDN Messages Asynchronously" from the Apex Salesforce's object-oriented, on-demand programming language. Class drop-down list.
- Copy the identifier of the publication that you are creating the action for and paste it into the Publication Value field.
- Select "Reference" from the Type drop-down list next to the Record ID field.
- Click the Record ID field then choose the Record ID field for the record that you are creating the custom action for.
- Click Save.
- Click Set Schedule.
- Enter the criteria you want to use to determine when the action executes.
- Click Save.
- Click Activate to activate the process.
Adding Criteria to an Active Process
To add more criteria to an active process clone it, make the changes you want and then activate it.