You need to sign in to do that
Don't have an account?
Gaurgk
Custom Export to csv button not working in vf page
Hi All,
I created aura component to display open activity records and to download all the records in the component using custom button (export to csv). For calling aura component as button I created vf page with lightning outapp.
When I am previewing the vf page on console its displaying the related records and downloading record in csv format(which is perfectly fine).
Problem: But when I am adding button on related list of open activities its showing the related records but not downloading in csv format. Its downloading in some unformatted file format and not able to see any records.
Kindly provide the suggestions. I am stuck with that I checked lots of link but nothing helpful.
Thanks in advance.
I created aura component to display open activity records and to download all the records in the component using custom button (export to csv). For calling aura component as button I created vf page with lightning outapp.
When I am previewing the vf page on console its displaying the related records and downloading record in csv format(which is perfectly fine).
Problem: But when I am adding button on related list of open activities its showing the related records but not downloading in csv format. Its downloading in some unformatted file format and not able to see any records.
Kindly provide the suggestions. I am stuck with that I checked lots of link but nothing helpful.
Thanks in advance.
Greetings!
Your exported file doesn't have any extension.
So mansion the content type for exporting your file as CSV.
Add contentType="text/csv#Export.csv;charset=utf8" for vf page.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi
Thanks for the response.
FYI, if I add the contenttype it will download the vf page and in my situation its downloading the code which i used to call aura component not the records which is getting dislayed through aura component.
Did u find the solution for this?