Custom Policy Creation
Cloudaware provides you with a Salesforce version of Java programming language that allows to adjust any of the existing policies to fit your needs. The article guides though steps required for creation of a custom policy.
Â
1. In the section TEMPLATES LIBRARY locate and open a policy template. Click Clone as New Policy.
Â
2. Review the policy details: modify the policy name, description, severity and labels (tags) if necessary. Pay attention to the naming convention (see the description below)! Click Create.
Â
Policy ID: use your company name or a short prefix instead of ca in a template to indicate a custom policy
Policy Name: leave the template name and add a short definition underlining the difference between the standard and custom policies
Description:Â specify this is a custom policy using the original description shortened if possible
Â
3. Open the tab 'Code'. Make the required changes in the policy. Refer to the tab 'Help' if necessary.
4. Click Dry Run and launch 'SOQL Dry Run' (1) and 'Process Dry Run' (2) to search for errors in your policy code.
1) 'SOQL Dry Run' evaluates the query which selects objects your policy will check.
2) 'Process Dry Run' selects and evaluates those objects according to your process code.
Â
5. If no errors are found, click Save (1) → Validate (2). Click the tab 'Deploy Results'(3) to review policy deployment results.Â
Â
6. If no error message appears, click Deploy Class. Wait for the deployment success message.
7. Execute and schedule the newly created policy.
8. Optional: disable the standard policy if the new one fits your needs better. For that, find the policy in the section POLICY LIST (if deployed), click triple dots and select "Disable Policy".
Â