How to get Record Type Id in Apex Salesforce

by Rijwan Mohmmed
0 comment
How to get Record Type Id in Apex Salesforce

Get Record Type Id by Developer Name :

Id recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName()   .get('techdicer_developer_name').getRecordTypeId();

Get Record Type ID by Name :

Id techdicerRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByName().get('record type name').getRecordTypeId();

What’s your Reaction?
+1
2
+1
0
+1
1
+1
0
+1
1
+1
0

You may also like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.