In this article we will look at implementing a simple lightning component that displays a list of contacts in a table. We will add a simple client side search box which searches all columns in the table.
Demo Link: https://forcetree-developer-edition.na147.force.com/s/datatabledemo
Demo Link: https://forcetree-developer-edition.na147.force.com/s/datatabledemo
This article covers the step by step instructions to setup Visual Studio Code (VSC) as an IDE for Salesforce Development. Originally VSC only worked with SFDX projects but now it supports general salesforce development as well as SFDX projects. This article only covers general salesforce development (connecting to a sandbox / developer org ). In a follow up article we will cover some exciting features of this new IDE.
Why VSC?
- Officially supported IDE by Salesforce.
- Eclipse IDE is no longer supported.
- VSC is open source, light weight and enables rapid force.com development.
- Rich debugging capabilities.
Step 1: Install Visual Studio Code
Java 8 is required. Make sure you download the latest from here https://www.java.com/en/download/.
Install VSC from the link https://code.visualstudio.com/ . Note that version 26 and higher is required. If you are running a older version, just download and install the latest from the link.
Install VSC from the link https://code.visualstudio.com/ . Note that version 26 and higher is required. If you are running a older version, just download and install the latest from the link.
Step 2: Install the Salesforce Extension Pack
Install from the link https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode or just search for the extension directly in the IDE as shown below.
Note that since I have already installed the extension the button shows up as 'Uninstall' for me. If doing for the first time, this should show as 'Install'.
Note that since I have already installed the extension the button shows up as 'Uninstall' for me. If doing for the first time, this should show as 'Install'.
Step 3: Create a new project with Manifest
Open the command palette (press Ctrl+Shift+P on Windows or Linux, or Cmd+Shift+P on macOS) and enter the command 'SFDX: Create Project with Manifest'
If you do not see the option ('Create Project with Manifest'), you might try restarting your IDE or verify if all per-requisites are met.
Step 4: Authorize an Org
Open the command palette (press Ctrl+Shift+P on Windows or Linux, or Cmd+Shift+P on macOS) and enter the command 'SFDX: Authorize an Org'
Use Production for developer / production org. Use custom if you org has a custom mydomain enabled. A browser window opens up, enter your credentials and return back to the IDE after successful login.
Step 5: Download metadata from the Org
Note that a default package.xml is created with pre-filled in metadata. To download just the content in the package just right click the file and choose 'SFDX: Retrieve source in manifest from org'. You could modify the package.xml to retrieve other metadata components not listed.
You will now notice that the folders below are populated with files from your org.
Step 6: Edit files and deploy
Edit any file and deploy by right clicking the file and selecting the deploy option. Note that the output window gives you the status of your deploy.