You need to sign in to do that
Don't have an account?
Gordon Gao
Visualforce pagereference redirects to empty page on Lightning Experience
We have a visualforce page for building opportunity products.
There's a button - "Save & Exit", which calls the controller method to save the selected products and returns the pagereference - "new PageReference('/' + ApexPages.currentPage().getParameters().get('Id'));"
Basically, it tells the page to go back to the opportunity page. This works perfectly in the classic view. But in lightning, sometimes, after clicking the button, the page goes to a blank page with only lightning sidebar & top bar rather than back to the opportunity page.
Can anyone provide any thoughts on this issue?
There's a button - "Save & Exit", which calls the controller method to save the selected products and returns the pagereference - "new PageReference('/' + ApexPages.currentPage().getParameters().get('Id'));"
Basically, it tells the page to go back to the opportunity page. This works perfectly in the classic view. But in lightning, sometimes, after clicking the button, the page goes to a blank page with only lightning sidebar & top bar rather than back to the opportunity page.
Can anyone provide any thoughts on this issue?
From Salesforce Knowledge Article:
When developing Visualforce pages for the full site developers can utilize the Page Reference class to control the navigation. This method is not supported in Salesforce1 and may not work as expected. Some pages will load using Page References however this may change with any update and should not be relied on. Salesforce Support is unable to troubleshoot issues that arise from using a Page Reference for navigation in Salesforce1.
Full Description can be found here:
https://help.salesforce.com/HTViewSolution?id=000212840&language=en_US
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
All Answers
Follow this link for sforce.one spec.
https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/salesforce1_dev_jsapi_sforce_one.htm
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
From Salesforce Knowledge Article:
When developing Visualforce pages for the full site developers can utilize the Page Reference class to control the navigation. This method is not supported in Salesforce1 and may not work as expected. Some pages will load using Page References however this may change with any update and should not be relied on. Salesforce Support is unable to troubleshoot issues that arise from using a Page Reference for navigation in Salesforce1.
Full Description can be found here:
https://help.salesforce.com/HTViewSolution?id=000212840&language=en_US
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
at the end of the commandButton, it should refresh the page. Example
Since Lightning is not able to render the page, this will refresh the page on completion of the action so you don't have to refresh it yourself.