Tag: lightning

File Upload in Lightning Web Component(lwc)

File Upload in Lightning Web Component

File Upload in Lightning Web Component(lwc) File Upload in Lightning Web Component(lwc) lightning-file-upload component provides an easy and integrated way for users to upload multiple files. The file uploader includes drag-and-drop functionality and filtering by file types. File uploads are always associated to a record, so the record-id attribute is required. Uploaded files are available …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/file-upload-in-lightning-web-component/

Decorators in Lightning Web Component(LWC)

Decorators in Lightning Web Component(LWC) Decorators in Lightning Web Component(LWC) The Lightning Web Components programming model has three decorators that add functionality to property or function. Decorators dynamically alter the functionality of a property or function. The ability to create decorators is part of ECMAScript, but these three decorators are unique to Lightning Web Components. …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/decorators-in-lightning-web-component/

Get Record Id in Lightning Component

Get Record Id in Lightning Component

Get Record Id in Lightning Component Get Record Id in Lightning Component using  force:hasRecordId Getting current record id in lightning component or lightning aura component is very easy. We need to add force:hasRecordId interface to a Lightning component to enable the component to be assigned the ID of the current record. The current record ID …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/get-record-id-in-lightning-component/

Use Lightning Web Components in Visualforce

Use Lightning Web Components in Visualforce

Use Lightning Web Components in Visualforce Use Lightning Web Components in Visualforce In this post, we will see how we can use LWC in Visualforce Pages or how to display Lightning Web Component In Visualforce Page. Even though the use of lightning is growing day by day, still some customers are using salesforce classic because …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/use-lightning-web-components-in-visualforce/

Use Static Resource In LWC(Lightning Web Component)

Create static resource

Use Static Resource In LWC(Lightning Web Component) Static Resource In LWC First, Import static resources from the @salesforce/resourceUrl scoped module. Static resources can be archives (such as .zip and .jar files), images, style sheets, JavaScript, and other files. The syntax for importing static resource in LWC When static resource has namespace myResource—A name that refers …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/use-static-resource-in-lwc/

Navigation Service in LWC(Lightning Web Components)

Navigation Service in LWC

Navigation Service in LWC(Lightning Web Components) Navigation Service in LWC(Lightning Web Components) To navigate in Lightning Experience, Lightning Communities, and the Salesforce app, use the navigation service, lightning/navigation. The lightning/navigation service is supported only in Lightning Experience, Lightning Communities, and the Salesforce app. It isn’t supported in other containers, such as Lightning Components for Visualforce, or …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/navigation-service-in-lwc/

for:each template directives in LWC

for each template directives in LWC

for:each template directives in LWC for:each template directives in LWC(Lightning Web Component) To render a list of items, use for:each directive or the iterator directive to iterate over an array. Add the directive to a nested <template> tag that encloses the HTML elements you want to repeat. We can call it for loop in LWC. …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/foreach-template-directives-in-lwc/

template if:true Conditional Rendering LWC

template if true Conditional Rendering LWC selected

template if:true Conditional Rendering LWC template if:true Conditional Rendering LWC(Lightning Web Component) To render HTML conditionally, add the if:true|false directive to a nested <template> tag that encloses the conditional content. template if:true|false directive is used to display conditional data. Render DOM Elements Conditionally Lightning Web Component The if:true|false={property} directive binds data to the template and removes and inserts DOM elements …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/template-iftrue-conditional-rendering-lwc/

lightning:recordForm Example

lightningrecordForm Example Create Record

lightning:recordForm Example lightning:recordForm Example lightning aura component lightning:recordForm component allows you to quickly create forms to add, view, or update a record. Using this component to create record forms is easier than building forms manually with lightning:recordEditForm or lightning:recordViewForm. The lightning:recordForm component provides these helpful features: Switches between view and edit modes automatically when the user …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/lightningrecordform-example/

lightning-record-form LWC

lightning-record-form LWC Create Record

lightning-record-form LWC (Lightning Web Component) lightning-record-form LWC lightning-record-form component allows you to quickly create forms to add, view, or update a record. Using this component to create record forms is easier than building forms manually with lightning-record-edit-form or lightning-record-view-form. The lightning-record-form component provides these helpful features: Switches between view and edit modes automatically when the …

Continue reading

Permanent link to this article: https://www.sfdcpoint.com/salesforce/lightning-record-form-lwc/