You need to sign in to do that
Don't have an account?
SastryM
lightning component in visualforce page
Hi All,
I have created a lightning component and the lightning component should be used in the visualforce page. Created a visualforce page and by lightning out added both app and component in the page, however I am unable to pass the current record Id to the component as I need the current record Id, based on which I am fetching the data.
I request for the help to how to pass the current record Id from visualforce page to lightning component
Thanks in advance
I have created a lightning component and the lightning component should be used in the visualforce page. Created a visualforce page and by lightning out added both app and component in the page, however I am unable to pass the current record Id to the component as I need the current record Id, based on which I am fetching the data.
I request for the help to how to pass the current record Id from visualforce page to lightning component
Thanks in advance
To get a record Id you need to implement the force:hasRecordId interface.
One you have done this you can access the record id by:
{!v.recordId}
- http://docs.releasenotes.salesforce.com/en-us/winter16/release-notes/rn_lightning_components.htm
- https://developer.salesforce.com/blogs/developer-relations/2015/11/building-context-aware-lightning-components.html
Hope this helps.Mark this as solved if the information helps.
Best Regards,
Nagendra.
All Answers
To get a record Id you need to implement the force:hasRecordId interface.
One you have done this you can access the record id by:
{!v.recordId}
- http://docs.releasenotes.salesforce.com/en-us/winter16/release-notes/rn_lightning_components.htm
- https://developer.salesforce.com/blogs/developer-relations/2015/11/building-context-aware-lightning-components.html
Hope this helps.Mark this as solved if the information helps.
Best Regards,
Nagendra.
Thanks it worked