Salesforce Lightning Web Component

Salesforce

How to navigate to Related List using Lightning Web Component(LWC) in Salesforce?

In lightning/navigation, standard__recordRelationshipPage can be used to navigate to Related List using Lightning Web Component(LWC) in Salesforce. Sample Code: HTML: <template> <lightning-card> <lightning-button label={buttonLabel} variant="brand" onclick={navigateToRelatedList}> </lightning-button> </lightning-card> </template> JavaScript: ....

Salesforce

How to hide and show tab in Lightning Tab Set in Salesforce Lightning Web Component(LWC)?

Sample Code: HTML: <template> <lightning-card> <lightning-button variant="brand" label="Show Tab 1" onclick={handleClick}></lightning-button> <lightning-button variant="brand" label="Show Tab 2" onclick={handleClick}></lightning-button> <lightning-button variant="brand" label="Hide Tab 1" onclick={handleClick}></lightning-button> <lightning-button variant="brand" label="Hide Tab 2" onclick={handleClick}></lightning-button> <lightning-tabset ....

Salesforce

Showing Image in Lightning Layout Item in Salesforce LWC

Sample Code: HTML: <template>     <lightning-card>         <div class="c-container">             <lightning-layout>                 <lightning-layout-item padding="around-small">                     <div class="header-column">                         <img                             src="https://infallibletechie8-dev-ed--c.documentforce.com/servlet/servlet.ImageServer?id=0155f000000F6it&oid=00D5f000001y2Vs"                             height="200"                             width="200"/>                     </div>                 </lightning-layout-item>             ....

Salesforce

Re-Usable lightning record update form using Lightning Web Component LWC in Salesforce

Sample Code: HTML: <template>     <lightning-card>         <lightning-record-form             record-id={recordId}             object-api-name={objectApiName}             fields={fieldsList}             mode="edit"             onsubmit={handleSubmit}             onsuccess={handleSuccess}>         </lightning-record-form>     </lightning-card> </template> JavaScript: import { api, LightningElement ....