As we know that we can include Lightning component in VF page by creating a Lightning App and add it to VF page by specify particular script. Sometime it is required to pass some dynamic value to component so that it can behave differently based on component attribute value.
Below is sample code which explains how to passed component attribute from VF page. Here we are passing Account name to lightning component by using standard controller on VF page.
In order to test the output, open below URL:
https://your-domain-url/apex/lightningVF?id=xxxxxxxxx
where xxxxxxxxx is Account Id.
Note:
RAISING AND HANDLING CUSTOM EVENTS IN sALESFORCE lIGHTNING
WHY TO USE DESIGN RESOURCE AND HOW TO ADD DYNAMIC OPTION TO DATASOURCE
PASSING INNER WRAPPER CLASS TO LIGHTNING COMPONENT
LIGHTNING COMPONENT FOR RECORDTYPE SELECTION FOR ANY SOBJECT
CUSTOM COMPONENT TO SHOW/HIDE SPINNER IMAGE
CUSTOM COMPONENT TO SHOW/HIDE SPINNER IMAGE
Below is sample code which explains how to passed component attribute from VF page. Here we are passing Account name to lightning component by using standard controller on VF page.
In order to test the output, open below URL:
https://your-domain-url/apex/lightningVF?id=xxxxxxxxx
where xxxxxxxxx is Account Id.
Note:
- Whenever you use extends="ltng:outApp" in Lightning app, SLDS is automatically get applied your components.
- If you don't want to apply SLDS, just use extends="ltng:outAppUnstyled"
- If you are having org namespace, then always use " <namespace>:lightningComponentName" instead of "c:lightningComponentName" in VF page.
Hope this will help!!
More Blogs>>:
DYNAMICALLY CREATING AND DESTROYING LIGHTNING COMPONENTS
RAISING AND HANDLING CUSTOM EVENTS IN sALESFORCE lIGHTNING
WHY TO USE DESIGN RESOURCE AND HOW TO ADD DYNAMIC OPTION TO DATASOURCE
PASSING INNER WRAPPER CLASS TO LIGHTNING COMPONENT
LIGHTNING COMPONENT FOR RECORDTYPE SELECTION FOR ANY SOBJECT
CUSTOM COMPONENT TO SHOW/HIDE SPINNER IMAGE
CUSTOM COMPONENT TO SHOW/HIDE SPINNER IMAGE
Salesforce is a global cloud computing company in California, United States. This corporation is best known for its Customer Relationship Management (CRM) product, now it’s expanded to commercial application. Being most popular cloud based CRM tool, it is used in most of the organizations to boost their business process. Thus, it increases the demand of trained and certified Salesforce developers and administrators.
ReplyDeleteSalesforce Training in Chennai|salesforce administrator training in chennai