I'd like to eliminate any warnings from Apex PMD that triggers alerts on custom objects for my Salesforce organization. Is there any way to add my custom objects to the linter?

For example, when I am creating an instance of a custom object I get a yellow underline that gives me a message of "InvalidType", No quick fixes available.

  • What do you mean, exactly? What kind of errors are you seeing?
    – sfdcfox
    Commented Apr 25, 2022 at 15:16
  • Have you tried sobject refresh in vs code?
    – user56430
    Commented Apr 25, 2022 at 18:57
  • @user56430 unfortunately, that did not work.
    – alfwhfwef
    Commented Apr 26, 2022 at 12:53
  • @alfwhfwef probably java location isn't set correctly for apex server.
    – user56430
    Commented May 8, 2022 at 9:32
  • @user56430 that is the correct answer with a caveat. Please see my answer below.
    – alfwhfwef
    Commented May 11, 2022 at 15:18

1 Answer 1


There is a bug in my installation of VS Code that allows data to persist in the background even though Workspace and User settings have been changed. I updated my User settings java location to overwrite the hidden info.

  • Can you provide the specific settings and actions you took to fix the error? Commented Jan 11 at 9:42

You must log in to answer this question.

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