function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lakshman.mattilakshman.matti 

pdf from lightning picklist

Hi All,

Here is my scenario, I have created a lightning component with pick-list values.
I have pick-list values as Preview of Record,download Record.
When i select Download Record, i want to down the record as pdf automatically.
I searched google for help, i see some posts where they have create quick action button and calling vf page.below is the reference of that method.
https://medium.com/@ToAnshulVerma/lightning-generate-pdf-within-lightning-experience-with-salesforce-data-cd82ae626cc3
But in my case i want to do the same functionality with Pick-list.
I want know that how we can vf page when pick-list value is selected.

Thanks,
Lakshminarayana
 
Khan AnasKhan Anas (Salesforce Developers) 
Hi Lakshman,

Greetings to you!

Please refer to the below link which might help you further with the above requirement.

https://medium.com/@ToAnshulVerma/salesforce-lightning-generate-pdf-from-lightning-components-with-in-memory-data-cd5dffe0fe25

You can use the onchange attribute on lightning:select instead of a button.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
lakshman.mattilakshman.matti
HI @Khan Anas,

Actually i have already refererred this Solution, but here he is actually calling vf page from Quick action button.
But in my case i want to do it from picklist value.Hope i'm clear with my question.


Thanks,
Lakshminarayana
Khan AnasKhan Anas (Salesforce Developers) 

Lakshminarayana, I have posted a different link in my previous reply. He created a Lightning component to accept a method and invoke it on button click. Then embedded Lightning component within Visualforce Page. 

You can use the onchange attribute on lightning:select instead of a button.