You need to sign in to do that
Don't have an account?

How to use Record Type without hard coding them in the formulas?
Hi All,
Can someone help me on how to make use of Record Types in formulas instead of using their Ids? so that the formula would be working for records created by that particular Record Type,
For Example how can i avoid using Ids in the below formula
Can someone help me on how to make use of Record Types in formulas instead of using their Ids? so that the formula would be working for records created by that particular Record Type,
For Example how can i avoid using Ids in the below formula
IF( AND( ISNULL(Request_Date__c) , ( RecordTypeId = '01234567Abcdefg' || AND( NOT(ISBLANK(Text(Process_Type__c))) , RecordTypeId = '7654321Abcdefgh' ) ) )
Also, RecordType.Name should work
You can use custom setting for this. Keep the record type Id in a custom setting and use that in your button code, it will look something like this "{!$Setup.CustomSettingAPI_c.RecordTypeId_c}"
For more information on similar issue may I suggest you please check with below link with a similar issue and a suggested workaround.
- https://salesforce.stackexchange.com/questions/1626/refer-to-record-type-id-in-formula-without-hard-coding
Hope this helps.Kindly mark this as solved if it;s resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
You can use custom setting for this. Keep the record type Id in a custom setting and use that in your button code, it will look something like this "{!$Setup.CustomSettingAPI_c.RecordTypeId_c}"
For more information on similar issue may I suggest you please check with below link with a similar issue and a suggested workaround.
- https://salesforce.stackexchange.com/questions/1626/refer-to-record-type-id-in-formula-without-hard-coding
Hope this helps.Kindly mark this as solved if it;s resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks,
Nagendra
Also, in the formula's you can use the recordtype.Developername field instead of Id. You should be able to use the recordtype name to compare against the specific recordtype name you want the formula to work for.
Hope it helps
RD
Thanks to all of you for taking time to reply,based on your replies i have realised that probably Hyerarchical CS can solve my problem but there are two concerns here 1) I would like to use RectypeIds, which should be available regardless of the Profile or user, 2) i'm facing syntax errors when used below syntax in the formula
!$Setup.CustomSettingName__c.CustomFieldName__c