There is an edit override on Opportunities in our Salesforce org, so I created a publisher action on opportunity with a VF page in the background. This VF page redirects to standard edit page. When I click "Save" or "Cancel" on the edit page, I am redirected to the previous page which is essentially blank because it was only used for Redirect. How do I fix this problem of going back to opportunity and bypass this intermediate page.



The intermediate page should have a Javascript logic to detect whether you are on SF1 or on Aloha UI and redirect based on that .I have observed that pagereference methods are not best suited for SF1 pages .

Here is a quick reference on how you will detect whether its a SF1 app or not reference

  • Thanks Mohit. My problem is similar to the one in the link below. To summarize: I have a Visualforce page publisher action on opportunity, this VF page opens up standard opportunity edit page(I am using sforce.one.navigateToURL('/'+opp.id+'/e') to redirect to standard edit page. Once I save the record, I am redirected back to the intermediate VF page(which is blank). I want to go to one more step back to the opportunity. salesforce.stackexchange.com/questions/23541/… – Lx123 Mar 4 '16 at 14:20
  • Mohit, did you get a chance to review? – Lx123 Mar 7 '16 at 18:18

I used the following code to close the intermediate page before the edit page opens. There is a bit of flicker before the standard edit page shows up. But I guess it is acceptable. Sfdc.canvas.publisher.publish({ name : "publisher.close", payload : {refresh:"true" }});

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.