How to get Record Type Id in Apex Salesforce

by Rijwan Mohmmed
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