function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nithya S 1Nithya S 1 

Record type null

Hi, I am.trying to filter on records with a null record type in procrss builder using a formula - (OR[Contact].RecordType.Id =<18 digit I'd>, ISBLANK([Contact].Record type.Id)) and it gives an error when the action is executed. How can we filter on a null record type using the formula?
I've also tried using the recordtypename. That didn't work too.
Abdul KhatriAbdul Khatri
You should be able to do like this. I used case but same can apply in your case for contact.

User-added image
Nithya S 1Nithya S 1
Thanks. But since I cannot give the 18 digit ID in the condition for the recrds that have the record type, I chose the formula. 
Abdul KhatriAbdul Khatri
But why you need to give check for 18 digit ID when you are only looking for null check.
Nithya S 1Nithya S 1
No, I have an OR condition that needs to be incorporated. Thanks!
Abdul KhatriAbdul Khatri
Can you try something like this

User-added image
Nithya S 1Nithya S 1
I did try the ISNULL, but that didn't work. Will try the length formula and let you know. Thanks again!
Abdul KhatriAbdul Khatri
I have entered those in the IF statement so it is something different than how you are using it.
Abdul KhatriAbdul Khatri
What happened, any feedback?
Nithya S 1Nithya S 1
Hi Abdul,
No, this didn't work as well. As long as the record type ID is present, the updates happen. But for records that have a blank record type ID, get an error.
Abdul KhatriAbdul Khatri
So any reason of checking the length because either the RecordTypeId exists or not. If it existis it will always be the Salesforce Id, which is 18 character. How you are expecting anything less than that? That field only excepts Salesoforce Id or nothing. So I am little not sure what exactly ou are looking.

For my perspective you should only be checking if the RecordTypeId is not null.

Please give me the use case where the Lenght of the RecordTypeId value is < 18
Nithya S 1Nithya S 1
And through the workflow rule, it doesn't error. But does not execute the action
Nithya S 1Nithya S 1
Hi, I was not checking for the length. It was an alternative that you suggested to see if the length is <18.
My requirement is to find records where contact type is either a value OR a null and update another field based on this.
So, the criteria I had given is (OR([Contact].RecordType.Id = '<18 digit ID>', ISBLANK([Contact].RecordType.Id)). But the ISBLANK doesn't work and neither does ISNULL and now not the length as well.
Abdul KhatriAbdul Khatri
Are you looking for a specific RecordTypeId value, if that is the case then you might need this check

But

if any value I am not sure why exactly you need this check because this check says
I don't care if RecordtypeId has a value or not, I need to update the other value, in other words you don't need to put this check.
Nithya S 1Nithya S 1
hi, I tried even without the check. But.it fails to update when the record type is blank. So, I included the check and that doesn't work as well.
Abdul KhatriAbdul Khatri
Question is why you need that check if you don't care RecordTypeId has a value or null. You can use the below option in order to avoid filtering

User-added image
Nithya S 1Nithya S 1
No, I don't mean this criteria. I mean the initial condition to consider records that are being updated. If the record.type is null, then update that with no other criteria in the action.
Nithya S 1Nithya S 1
We have contacts with recordtype x, y and blank. I would want to update contacts with recordtype x and blank. So, in the formula, I used the OR condition. Also tried with recordtype <>y. That didn't work as well for record types with a blank value. Hope this is now clear
Nithya S 1Nithya S 1
Hi Abdul,
I've tried this before. Even before moving the logic to formula. But the condiiton does not accept the 18 digit ID field and which is why it won't work and had to move it to a formula.
https://help.salesforce.com/articleView?id=Why-does-my-process-not-trigger-when-trying-to-filter-by-an-ID-field&language=en_US&type=1
Abdul KhatriAbdul Khatri
The Link you shared does say that is the resolution to provide 18 characters ID instead of 15 characters. See the screen shot highlighted below

User-added image

I also tried with both 18 characters and it did work for me. Please note if you copy paste the ID, there is a possibility it embed spaces in the beginning so make sure you took them out.
Nithya S 1Nithya S 1
Hi, It works for me when the record type is not null. But when I try updating a record with a null record type, it errors. I've tried using the condition as well.
Nithya S 1Nithya S 1
Solved the issue. It seems like it expects a check when cross referencing a field which was also part of my condition. Thanks for your help!