I am getting the error

No such column 'DeveloperName' on entity 'RecordType'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.: Source

when saving a Lightning component on my sandbox after Summer '19 release.

The Lightning component is using an Apex class where the below code is causing the error :

Set<String> objAPINames = new Set<String>{'Account', 'Opportunity'};
Map<String,Id> mapValues = new Map<String,Id>();
for(RecordType rt : [select SobjectType, DeveloperName, Id
                     from RecordType
                     where SobjectType IN :objAPINames
                     order by SobjectType ASC ]){
    mapValues.put(rt.DeveloperName, rt.Id);

This code works fine in Developer Console, Apex Classes, Triggers. It is only causing error when I am saving Lightning Component calling the class.

Anyone got this issue after the new release?

  • 2
    Did you try recompiling all the classes in your org. Go to apex classes under setup and use compile all classes link. We faced something similar and got it fixed by recompiling all the classes Commented May 9, 2019 at 15:45
  • Thank you so much @AshishSharma. It worked. I need to deploy those Lightning Components and classes to another Summer '19 sandbox and a Spring '19 production environment. The code does not exist in those org. yet. Do you think there will be similar issue while deploying?
    – S..
    Commented May 9, 2019 at 16:01
  • 1
    I am not sure but It should not be an issue as this will be new metadata moving to target org. In case if it causes any issue, you can always deploy it in parts. First moving the classes, compile the classes/run test classes and then deploy lightning component. Commented May 9, 2019 at 16:07
  • 1
    @AshishSharma You should add your comments as an answer as that seemed to be the resolution here.
    – Jayant Das
    Commented May 9, 2019 at 16:14
  • Ok @AshishSharma. Thank you so much for your help. I shall keep that in mind.
    – S..
    Commented May 9, 2019 at 16:14

3 Answers 3


Please recompile all classes in org by using compile all classes link on apex classes page under setup or you can do runAllTest in org which will recompile the covered classes. This will fix the issue. We faced a similar issue after Summer 19 release and got it fixed by recompiling all the classes.

  • 1
    To all those having similar issue, 'Compile all classes' works. But I had to do it more than once. I did it yesterday, all was good. Today I login to continue working on my Lightning Component and I got same issue. So I had to 'Compile all classes' again. Until Salesforce applies a patch, we may need to compile all classes a few times.
    – S..
    Commented May 10, 2019 at 10:25
  • 1
    This release is still in preview. So I am pretty sure that before GA, Salesforce will resolve this or they will not release the update which is causing this. Commented May 10, 2019 at 11:16
  • I agree on this point, Ashish. Hoping for a fix soon though.
    – S..
    Commented May 10, 2019 at 11:43

Check this Know Issue with workaround: salseforce known issue

​​​​​​Workaround Use Metadata Api or VS Code and SFDX to deploy changes to your lightning components

  • Thanks. I managed to solve the issue by recompiling all Apex Classes as suggested by Ashish. The link to the known issue is useful though. Thank you very much.
    – S..
    Commented May 9, 2019 at 16:58

If you're still having this problem in 2020+ You just have to go to the class that is causing the error and update it's API version to the most current, then re-compile all the classes from setup and you're done.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .