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();

You may also like

Leave a Comment