To invoke a business policy manually, you can add a custom button to the detail page for an object.


The app contains a few pre-defined buttons, for assignment of Leads, Accounts and Cases. If your policy operates on a different object, or has a name other than Assignment, you will need to create a new custom button. 


Creating a new custom button

A new custom button should have properties like this:

where the URL has this form:

{!URLFOR("/apex/DecsOnD__ApplyPolicy", "")}?DecsOnD__ID={!<object name>.Id}&DecsOnD__policy=<policy name>


You should replace the <object name> and <policy name> with the name of the object you are assigning, and the name of the policy to invoke.


Adding the button to your page layout

After defining your custom button (or if you are using a pre-defined button), you need to add it to the page layout for the relevant object.


For Lightning

Drag the button from the Mobile & Lightning Actions section into the Salesforce Mobile and Lightning Experience Actions section of the page layout:



If the Salesforce Mobile and Lightning Experience Actions section is not editable, click override the predefined actions first:

For Classic

Drag the button into the Custom Buttons section of the page layout: