How To Enable SObject Intellisense in VSCode for Salesforce DX

Quick Tip.

Salesforce DX already comes with Intellisense for Apex classes and the different primitive types. Eg. Strings

For SObjects it’s a per-project setting you need to enable once you have your project created. Open the Command Palette and choose SFDX: Refresh SObject Definitions

What the command does under the hood is it will create a class definition of the SObject and store them under the .sfdx folder/tools folder. These don’t get committed to version control as the .sfdx folder is by default ignored.

Each class has properties that allows the Intellisense to work.

Once enabled you are good to go.

If you want more tips and information on Salesforce DX checkout my youtube playlist where I cover them in detail.

Hidden Gems on the Spring 18 Salesforce Release For Developers

Salesforce Spring 18 comes with some pretty nifty updates for developers. Been playing around with some of the new stuffs and will come up with some videos for each as I get in depth with them more.

 

  • Flow Enhancements
    • Ability to add Lightning Components to Flow –  lightning:availableForFlowScreens
    • We can already make Lightning Component as a Quick Action, now you can do that with Flow too
  • New Base Lightning Components
    • This  new base components works together and allows you to build forms faster. It determines the field type, field level security and displays the field styled(LDS) accordingly. Similar to using force:inputInputField but with less controller and apex work.
      • lightning:recordEditForm
      • lightning:inputField
    • New base components – carousel, formattedAddress, formattedName, formattedTime, inputAddress, inputField, listView, pillContainer, treeGrid, and prechatAPI.
  • Salesforce DX
    • Two types of second generation packing
      • ISV type managed packaging
      • Developer controlled packaging – unmanaged packaging but upgradeable. Wuhoo!
  • Component Library
    • View documentation on the base and your custom built lightning components
      • simply add /componentReference/suite.app to the base URL
  • Einstein Vision
    • This soo cool, you can train deep-learning models to detect images and count distinct objects within an image with Einstein Object Detection.
  • UI API
    • Recreate the Salesforce page layout on any web app or mobile app. You can can pretty much do CRUD operations with the API.
  • Some other stuffs worth mentioning
    • Cloning sandbox now in beta
    • Debugging – public site users no longer need a browser cookie to activate debug logging. FTW.
    • Custom metadata in validation rules in pilot

What are your favourite features?

Stay tuned!