2

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?

2
  • 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
    Commented Mar 27, 2021 at 4:52
  • Solved this by reinstalling the Salesforce Extension pack. Commented May 22 at 7:27

1 Answer 1

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!

You must log in to answer this question.

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