You need to sign in to do that
Don't have an account?

Lightning Custom Button (With Visualforce Page rendered as PDF) Not Working
Hi All,
We have a custom button (part of case detail page) with visualforce override (VF page has been rendered as PDF). This button works perfectly fine in classic. I can see the pdf generated.
In Salesforce lightning, this is throwing an error. "An internal server error has occurred. An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience."
When I inspect the page and see I see this error "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided " . Debug logs also not showing any errors.
Any idea why this button is not working in lightning ?
Thanks
Natraj
Go to visualforce page "
Available for Lightning Experience, Lightning Communities, and the mobile app" check this checkbox
Thank you !!! Thats already checked. Not sure why page is not loading.
Thanks
Natraj
Hi Natraj
I am also getting the same issue, Did you able to find the solution/reason for the same.?
Tarun
Yes I got it working, please set lightningStylesheets="false" and try to access the page in lighting. Salesforce support confirmed that VF pages rendered as pdf cannot have this as true. Please do share your findings.
Thanks
Natraj