Category: Salesforce
Create Component In LWC and display in salesforce page
Following are the steps to create component in LWC and display in salesforce page: Create Default Search org from VS code. Authorize an Org. Create Lightning web component. After creating the lightning web component it will show the component under
Call Apex Function inside an LWC Function
While creating the LWC component whenever you want to call an apex function you use the @wire function in it and pass parameter in it which has @track or @api decorator attached with it like @track id; or @api id;
Salesforce DX – Spinning Up a new scratch org
Steps to create scratch org in Salesforce DX Open the directory folder where the Salesforce DX code is present. Create scratch org with the help of a command palette or Terminal by authorizing dev hub. To Authorize dev hub Press
How to use Custom Labels in Lightning Web Components
Custom Labels are text values that can be translated into any language that salesforce supports. We can use custom labels to represent help text or error messages to the users in their native language. Custom labels can be fetched from
Using Developer Console in Salesforce
Executing Apex code in the developer console Login to Salesforce and switch to classic and click Developer Console Click to debug -> and click “Open Execute Anonymous Window” or Ctrl/E Write code in the window and execute as following After
Salesforce | Lightning Navigations in LWC
Lightning Navigations are used to generate a URL or navigate to a page reference. With lightning navigation, we can navigate to Pages, Records, Lists, Webpages, Custom tabs, Reports, etc. There are the steps to use the navigation in LWC: Step
Displaying the records from multiple related Salesforce Objects on a Lightning Web Component.
The records from a single Salesforce Object can simply be displayed in a Lightning Web Component by using the lightning datatable, but in order to display the records from multiple objects on the same Lightning Page, we need to use
How to Pass Data From one Component to another Component in Lightning Using Events
We can send data from One Lightning Component to Another Lightning Component using Events. We can use Application Events to send data from one Lightning Component to another. We have to follow 4 steps to send data from one component
Passing Data From One Lightning Web Component to Another Lightning Web Component
Sometimes there is a requirement to pass data from one LWC to another which are not in the same DOM tree i.e they are not linked to each other so for that earlier we used to use the pubsub library