Salesforce Lightning Web Component

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 ....

Salesforce

How to reset lightning-record-edit-form and get also get record id in Salesforce?

Sample Code: HTML: <template>     <lightning-card title="Lead Creation">         <lightning-record-edit-form object-api-name="Lead" onsubmit={handleSubmit} onsuccess={handleSuccess}>             <lightning-messages></lightning-messages>             <lightning-input-field field-name="FirstName"></lightning-input-field>             <lightning-input-field field-name="LastName"></lightning-input-field>             <lightning-input-field field-name="Email"></lightning-input-field>             <lightning-input-field field-name="Phone"></lightning-input-field>             <lightning-input-field field-name="Company"></lightning-input-field> ....

Salesforce

How to subscribe to Platform Event using Lightning Web Component in Salesforce?

HTML: <template> <lightning-card title="EmpApi Example" icon-name="custom:custom14"> <div class="slds-m-around_medium"> <lightning-button variant="success" label="Subscribe" title="Subscribe" onclick={handleSubscribe} disabled={isSubscribeDisabled} class="slds-m-left_x-small"></lightning-button> <lightning-button variant="destructive" label="Unsubscribe" title="Unsubscribe" onclick={handleUnsubscribe} disabled={isUnsubscribeDisabled} class="slds-m-left_x-small"></lightning-button> </div> <lightning-datatable key-field="ReplayId" data={listEvents} columns={columns} hide-checkbox-column="true"> </lightning-datatable> </lightning-card> ....