Debugging validation formula containing Custom Permission causes formula to fail with 'invalid (null)' when org has encryption enabled
Last updated 2022-02-10 ·Reference W-2757311 ·Reported By 0 users
Debugging validation formula containing Custom Permission causes formula to fail with 'invalid (null)' when org has encryption enabled.
The issue can occur in when all the following conditions are met:
1. trace/debug logging of validation rules is enabled for a user
2. the validation formula references a custom permission
3. the org has (or had) encryption enabled
1. Create a custom permission (Setup | Build | Develop | Custom Permissions) e.g. MyCustomPermission.
2. Create a validation rule against any standard or custom object, and include a reference to the custom permission in the formula. Example:
a. Go to "Setup | Build | Customize | Accounts | Validation Rules | New".
b. Include a custom permission reference in the formula. Example: $Permission.MyCustomPermission
c. Make sure the validation rule is set to 'active'.
3. Enable debug logs for validation rules:
a. Go to Setup | Monitor | Logs | Debug Logs.
b. Setup debug logs for the current user.
c. Set the filters for 'Validation' to 'INFO'.
4. In the UI, create create (or update) a record for the object you setup the validation rule for in #2 e.g. Account.
5. Click on 'Save' in the UI.
There is no known workaround other than disabling (Validation=NONE) debugging on validation rules to avoid the problem.
Reported By (0)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.