You need to sign in to do that
Don't have an account?
Paweł Woźniak
Schema getRecordTypeInfosByDeveloperName() method does not exists.
Hi.
Happy about finally delivering option to get recordId by developer name, see relase info https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_apex_developer_name.htm I wanted to use it. It works perfectly on Anonymous execution, however if used in apex class it is not possible to save due to method does not exists error.
Happy about finally delivering option to get recordId by developer name, see relase info https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_apex_developer_name.htm I wanted to use it. It works perfectly on Anonymous execution, however if used in apex class it is not possible to save due to method does not exists error.
Id devRecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('PersonAccount').getRecordTypeId(); System.debug(devRecordTypeId);In anonymous execution it returns a value in debug. Using in apex class gives an error:
Method does not exist or incorrect signature: void getRecordTypeInfosByDeveloperName() from the type Schema.DescribeSObjectResultDo we have SF peoples here? Can you please fix it.
Hi Paweł ,
Click on Edit and Change your apex class version to 43 by switching to version settings tab .
Hope this helps.
All Answers
Please make sure your org is updated to Version 43..
--
Thanks,
Prashant
I put it in the constructor of an Apex Class.
I don't think its a bug in Salesforce if it is working for me. I was using a sandbox on CS53.
Hi Paweł ,
Click on Edit and Change your apex class version to 43 by switching to version settings tab .
Hope this helps.