I am working in lightning.

As Contact Role is not supported on Account in lightning. So am using visualforce page for account view and add Contact role related list as tab on Account. But when i click on New button to add contact role it will open in old salesforce and after click on save button it will not redirect back to lightning page.

How to redirect back to this in lightning.


Pritam, you can try to identify if you are in lightning or not by the code below and then redirect the user to the appropriate experience. I don't think that is the best solution in terms of UX, but is a way.

function isLightningExperienceOrSalesforce1() {
    return((typeof sforce != 'undefined') && sforce && (!!sforce.one));
  • But am not using visualforce page for ContactRole on Account. It's related list on Account and when i click on new then standard page open and on save button it's not redirect to parent page. – Pritam Shekhawat Jan 14 '16 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.