0

I use VS Code with Salesforce extensions and connect to my sandbox as explained here:

https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model

With my package.xml I fetched apex classes and custom labels from sandbox.

In settings I enabled push-or-deploy-on-save.

On saving and deploying I always get error messages where custom labels are used: "External string does not exist: MY_LABEL":

static final String MY_LABEL = Label.MY_LABEL;

My custom labels exist in the sandbox and in my project, so what causes this error?

Regards

1

Shouldn't you use System to call Custom Labels?

static final String MY_LABEL = System.Label.MY_LABEL;
  • no, System.Label gives same error, and code worked before I moved to VS code. – Obi_77 Aug 28 at 9:35

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.