Use of Record Type in Process Builder are different in Filter Condition and Action to fire. In Actions we can use only the Record Type Id, there is a limitation in Salesforce that we cant use the Record Type Name or Developer Name in process builder Action.
But there are three ways to reference the Record Type in filter criteria when working in the Process Builder.
In filter condition we can use – Record Type Id, Record Type Name and Record Type Developer Name.
Record Type ID: [Object].RecordTypeId
This option must use the full 18 digit record type ID of the record type
Record Type Name: [Object].RecordTypeName
This option needs to use the Display Name of the Record Type
Record Type Developer Name: [Object].RecordType.DeveloperName
This option needs to use the API name of the record type found on the “Record Type Name” field on the record type details page.
To get the record type ID :
SELECT Name, Id FROM RecordType Where SobjectType = ‘<object name here>’
NOTE – To user record type Id use the 18 character Id instead of using 15 character Id,
When you use a formula instead of criteria, you can use the CASESAFEID function directly, eg :
CASESAFEID( [Task].OwnerId ) = CASESAFEID( $User.Id )
To get the 18-character Id of a record you could use:
- Formula Function: CASESAFEID
- an API tool like – Workbench / Developer Console
Note: If the operation used is “Contains” it can work with 15 character ID but if there are 2 similar ID in the org e.g 0012000001A6uJE & 0012000001A6ujE (note the letter j capitalized in one of the IDs) the process will fail. So the best practice is to use Equals operator.