The $ObjectType global gives you access to refer to elements of your Salesforce org's schema. It does not provide access to cross-relationship data, or any data at all in actual records; it only yields information about the objects and fields in the org. If your object has a field Relationship__c, you'd refer to its fields in a validation rule via the ...


Use NULL instead of "". IF(Demo_Set__c, CASESAFEID(WhoId), NULL) Passing in an empty string for an ID value isn't allowed, so that may be the source of your problem.


Currently (early 2020), Salesforce formula operator precedence reverses (*,/) with (^). In normal applications, the exponents will be evaluated first, but in Salesforce formulas, the multiplication (or division) operators are evaluated before exponents. Users must use parentheses to work around this non-standard interpretation of mathematical expressions. ...

Only top voted, non community-wiki answers of a minimum length are eligible