LWC Archives

Custom Quick Actions on the LWC page when Modal is created using an Aura component

Author - Webner
|
0 Comments
|

Quick Actions can’t be used with Lightning Web components. Let’s say that the record page has a button that, when clicked, integrates an Aura component that displays a modal. On the Lightning Web Component page, the coding is complete, and there are custom Quick Actions in use. In Read more…

Getter in LWC

Author - Webner
|
0 Comments
|

LWC component does not allow us to perform expressions in an HTML file so if we want to achieve any expressions in an HTML file in this case we can complete the expression in our getter in a .js file and then we can use that getter in our HTML Read more…

Rest CallOut in LWC

Author - Webner
|
0 Comments
|

Rest CallOut can be made in Salesforce in two ways:

Server-side controller (Apex Class)
Client-side controller (Js Controller)

Server-side controller (Apex Class): We can make an API callout from Apex , which provides support for REST and SOAP callouts. Before making callouts from the apex, we Read more…

How to deploy the LWC component on a Local Development Server

Author - Webner
|
0 Comments
|

You can deploy your LWC component on a local development server. Once you deploy your component on a local server, then you do not need to deploy again and again to see the output. You just need to save your code in VS code and then the updated output will Read more…

LWC to create a custom editable datatable.

Author - Webner
|
0 Comments
|

LWC also provides a standard editable datatable, but it can’t be flexible in design. So we can create a custom datatable by using LWC in the following way, in which we can make changes as per our needs.

LWC HTML Code for datatable:

LWC JS Code Read more…

Call Apex Function inside an LWC Function

Author - Webner
|
0 Comments
|

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; and whenever there is any change in the parameter the Read more…

Salesforce | Lightning Navigations in LWC

Author - Webner
|
0 Comments
|

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 1: import { NavigationMixin } from ‘lightning/navigation Read more…

Difference Between Aura Components and LWC

Author - Webner
|
0 Comments
|

Four separate technologies are used together for web components in Salesforce:

Custom Elements: JavaScript APIs help to develop the HTML elements with custom templates, tag names like and behaviours.
Shadow DOM: For isolation of CSS and JavaScript living Standard DOM specification has the definitions of this.
HTML templates Read more…

Salesforce | UI Record API in LWC

Author - Webner
|
0 Comments
|

UI Record API is used for fetching, creating, updating and deleting the particular record without using the SalesForce Apex Class. These APIs are:

Get Record
Get Field Value
Create Record
Update Record
Delete Record

Below is the sample code of the js controller of LWC for getting the particular record Read more…

Salesforce | Iterate list in LWC

Author - Webner
|
0 Comments
|

In LWC, we have two ways to display the list of records in our web component

for:each:

for:item=”currentItem”: This is used to access the current item.
for:index=”index”: used for accessing the current item’s index.
key={uniqueId}:Read more…

Salesforce | Decorators in LWC

Author - Webner
|
0 Comments
|

There are three decorators in lightning web components. These decorators add functionality to property or function.

@api: To expose a public property, decorate this with @api. Public properties are reactive which means changes to the value of a reactive property will re-render the component and all the Read more…

How to create a collapsible section in Salesforce LWC

Author - Webner
|
0 Comments
|

Problem: We can create a collapsible section in Salesforce Lightning Web Component using slds-section slds-is-open LWC classes or HTML <details> tag. But we are are using LWC classes slds-section and slds-is-open we need to provide svg icon as given the below Read more…

Lightning Record Edit Form (LWC)

Author - Webner
|
0 Comments
|

In Salesforce, LWC allows us to use lightning-record-edit-form which implements Lightning Data Service and doesn’t require any additional Apex controllers to create or update record data. It also takes care of field-level security and sharing for us, so that users can only see Read more…