I have Lightning App Page created using App Builder with diffrent components embedded into it which is being invoked from a VF page. I would like to pass parameters to the page which will be used by the embedded components to fetch data from SF database and these components have attributes defined. I was passing parameters in the URL to the app page and hoping that I can read them from these components but I could not.

I also tried obtaining them using v.pageReference.state but no success.

Finally I thought the only way is using window.location in the components and obtain them.

Is this the way only we can obtain URL parameters in lightning components embedded in a Lighting App Page created using App Builder??

You need to utilize Application Events here.

Create an application event with parameters, and then set those parameters and fire the application event from your VF page. Handle that event in your lightning components and accordingly perform further operation.

Take a look on Firing Lightning Events from Non-Lightning Code, which explains as how you can utilize this approach with examples.

  • Jayant, Thanks but I need to navigate to the App Page from VF and I don't think I can achieve that using Application Events. – sdondeti Dec 4 at 15:30
  • Your question mentions -- [which is being invoked from a VF page. I would like to pass parameters to the page which will be used by the embedded components]. Is that not the case? Even if you navigate from VF to the app page and fire the application event, all components in the app page will be able to handle the event. – Jayant Das Dec 4 at 15:33

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.