1

This is what I see in VScode:

enter image description here

I have the Salesforce extension packed installed, but I'm not sure everything's working correctly here. Keywords "with" and "sharing" are not coloured, plus I don't get any autocomplete suggestions when writing code.

I don't even get suggetions for objects fields when writing code. For example:

enter image description here

I don't get any suggestion for the newCase fields when using dot notation.

Is this the expected behaviour?

1
  • Have you tried "sfdx: refresh sobject definitions" from the Command Palette? This usually fixes any auto-complete problems. Also, check the Apex Language Server output and make sure it's running. Without that, you'll get syntax highlighting problems. You may want to deactivate/reactivate the extension bundle, or try uninstalling the bundle and resinstalling. You also need to restart after installing. – sfdcfox Mar 27 at 4:52
0

Solved this. Apparently, there was a problem with my Java version/JDK. I had version 9 installed, but there was some sort of conflict between it and the "Apex" extension on VSCode.

I've uninstalled both Java and the whole salesforce extension pack plugins on VSCode, installed Java 11, re-installed the salesforce extension pack and everything works fine now.

Hopefully this will be useful to someone who might experience the same issues!

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.