You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
Determine if record type exist
Hello All,
Looking to get the Recordtype off an objetc but was wondering what woul di do if the name was changed?
Thanks,
P
Looking to get the Recordtype off an objetc but was wondering what woul di do if the name was changed?
accountRTId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('First load').getRecordTypeId();Is there a better way to do this to make sure this doe snot throw an exception if a user changes the name?
Thanks,
P
list<RecordType> recordtype = [Select Id From RecordType Where SobjectType='Account' And DeveloperName = 'First_Load' Limit 1];
if (recordtype.size() == 1){
}