Lightning

LWC: How to create Lightning Message Channel?

You need Lightning Message Channel for Lightning Web Component Message Service to work. Below are the steps with which you can create Lightning Message Channel.

Continue reading “LWC: How to create Lightning Message Channel?”
Lightning

Get Loggedin User Details in LWC without Apex call

Getting user object fields value in Lightning web component without calling an Apex class.

While working on User Interface design, many times you need to display logged in user interface. Salesforce gives a way to get ID of logged in user directly, but all other fields are usually fetched by calling an apex class.

Continue reading “Get Loggedin User Details in LWC without Apex call”
Lightning

Create a JSON string in JavaScript

Sometimes we might need to create a custom JSON string in a JavaScript section. Custom JSON string means, it can have any field which is or is not in any sObjects. There are multiple ways to create JSON string.

Continue reading “Create a JSON string in JavaScript”
Lightning

LWC: Clicking a button from a JavaScript Method.

When working in LWC, there will be a scenario where you may have to click a button based on some criteria or some condition from backend(Client side JavaScript section). In HTML, for every tag there is a unique attribute Id. Similarly, when working with LWC’s HTML, for every tag there are multiple unique attributes, one such attribute which can be used is data-id=”Unique_Id”.

Continue reading “LWC: Clicking a button from a JavaScript Method.”
Lightning

LWC: Custom picklist using lightning-combobox

When working with LWC sometimes, you need a list of values in picklist(combobox) which is fetched from an apex class. Values can be based on some condition. So, in this blog, we will see how to fetch a list of sObject records and bind values into <lightning-combobox />.

Continue reading “LWC: Custom picklist using lightning-combobox”