You need to sign in to do that
Don't have an account?
Process Builder update Record Type
Hi,
I'm trying to create a process to get rid of all my workflow rules, but I am struggling with the fact that I need to set an ID in order to update a record type.
I am forced to set the record type ID, and I cannot select the Record Type Name, like I used to do with workflows.

I am mising something? Is there anyway to set the Record Type based on the name and not on the ID?
Thanks in advance, Laura
I'm trying to create a process to get rid of all my workflow rules, but I am struggling with the fact that I need to set an ID in order to update a record type.
I am forced to set the record type ID, and I cannot select the Record Type Name, like I used to do with workflows.
I am mising something? Is there anyway to set the Record Type based on the name and not on the ID?
Thanks in advance, Laura
https://org62.my.salesforce.com/kA130000000ZgNc?kavVersion=43&lang=en_US&popup=true
@Ravi, you will have to update record Type refering to its record ID as it point as the option to update the record type using name is currently not present.
For the lead conversion question, Process is nothing but a flow at the backend so it should pretty much work like a flow. And the issue seems to be fixed in the flow - the link you've mentioned.
All Answers
Since then I've been searching myself and I think there is no way but to hardcode the Id.
Also I found other problems with Process Builder, as it is not bulkified and you hit governor limits with simple operations.
https://success.salesforce.com/issues_view?id=a1p30000000T3sCAAS
https://org62.my.salesforce.com/kA130000000ZgNc?kavVersion=43&lang=en_US&popup=true
@Ravi, you will have to update record Type refering to its record ID as it point as the option to update the record type using name is currently not present.
For the lead conversion question, Process is nothing but a flow at the backend so it should pretty much work like a flow. And the issue seems to be fixed in the flow - the link you've mentioned.
Create the extra (text) fields in your custom objects, like:
Field_for_RT1 and Field_for_RT2
Create a trigger for your (custom) object something like this
trigger CustomObjectName on CustomObjectName__c (before insert) //Replace CustomObjectName by the real name of your object
{ Id RT1 = Schema.SObjectType.CustomObjectName__c.getRecordTypeInfosByDeveloperName().get('RecordtypeName1').getRecordTypeId(); //replace RecordtypeName1 by the real name of your recordtype
Id RT2 = Schema.SObjectType.CustomObjectName__c.getRecordTypeInfosByDeveloperName().get('RecordtypeName2').getRecordTypeId(); //replace RecordtypeName1 by the real name of your recordtype
for(CustomObjectName__c COName : Trigger.new)
{
COName.Field_for_RT1__c = RT1; //here you store the ID of recordtype 1
COName.Field_for_RT2__c = RT2; //here you store the ID of recordtype 2
}
}
If you deploy this to a sandbox or production, you don't need to change anything because it get's the RecordType of the sandbox of production
Now you can use the this field as field reference or in a formula where you pick the Field_for_RT.. you need.
Of course you can also use a trigger to change the recordtype when all the required conditions are met. In that case you get the id as mentioned above and in the for section you change it by: COName.RecordTypeID = RT1 (or RT2) and you don't have to make the extra fields