0

I've found a way to open a VF rendered as PDF inside lightning using:

sforce.one.navigateToSObject(contentDocumentId);

But then, when I try to open same file at classic salesforce the following error appears:

"Error in $a.getCallback() [sforce is not defined]."

So, I found a way to open the PDF at classic salesforce:

window.location.href = 'http://salesforce.com/LINKPDF';

The problem is the window.location.href solution open the PDF and quit app. I need a way to keep the app opened and show the PDF just like the navigateToSObject solution.

Is there any way to do that?

1 Answer 1

2

If you're in Classic, you can open a new window (window.open(...)), or you could use an iframe, etc. There's no standard solution in Classic, which is the point of the newer frameworks (Salesforce1 and Lightning Experience).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .