[SalesForce] How to access Account Record Type by name on case validation rule
How can i access account record type by name while creating a validation rule on case object.
Best Answer
In the validation rule, add the field Account.RecordType.Name to access the record type name of the Account in your case object.
Also, for developer name, use Account.RecordType.DeveloperName
DeveloperName is not the same as Name. It has special restrictions, much like API names (can't start with a number, no spaces or punctuation, etc). Check the Developer Name attribute of your record type. The formula editor won't throw an error, but you'll never match a DeveloperName to a string that contains spaces.
Required. The unique name of the object in the API. This name can
contain only underscores and alphanumeric characters, and must be
unique in your organization. It must begin with a letter, not include
spaces, not end with an underscore, and not contain two consecutive
underscores.
Best Answer
In the validation rule, add the field
Account.RecordType.Name
to access the record type name of the Account in your case object. Also, for developer name, useAccount.RecordType.DeveloperName