Overview:
An 18-digit ProfileId does not work in Formula Fields. What length of digital ID should be used for the ProfileId in formula fields?
Root Cause:
Formulas recognize information mainly from the User Interface (UI) which is a 15-digit ID format. When there is an ID with 18 digits, that ID is usually caused from an export or another program that uses API integrations to send and receive the information. With formulas, the 18-Digit IDs are not recognized in the system because they are not in the UI.
Solution:
Use a 15-digit ID format with formulas:
Or use the CASESAFEID function to keep the Ids on both sides with an 18-digit ID format:
CASESAFEID( Owner:User.ProfileId ) = CASESAFEID('xxx...xxx')
Related Documentation:
Salesforce Help Documentation:
- Issues with 18 Digit ID and not 15 Digit ID in custom Formula
- Here’s a riddle: When is a Salesforce ID not a Salesforce ID?