2

After I added and renamed some objects in my scratch org and pushed the code, I found that those changes were not reflected in the lwc files under .sfdx/typings. So I thought deleting this folder would force sfdx to regenerate them. I was wrong, and I cannot find a way to regenerate the files in this folder, which means autocompletion is VS code no longer works properly. Is there a sfdx CLI command that would regenerate those files in .sfdx/typings?

2

There is an Command for it and can be found in the Command Pallete (CMD + Shift+ P) and select "SFDX:Refresh SObject Definitions"

enter image description here

Click on this should regenerate the typings for you .

  • 1
    Would this work as well if connected to a non-sourced sandbox org using the method outlined here? developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/… – Daniel Fuller Apr 13 '19 at 4:09
  • The behavior I'm seeing in my sandbox org with this is that some of the typings are populated but not for all the classes in my classes folder. Many are left out. I wasn't sure if there was a potential bug when retrieving and refreshing a larger amount of metadata. – Daniel Fuller Apr 13 '19 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.