I have a VisualForce page inline1 embedded in Account page layout. While hitting the save button in the visualforce page it redirects to some other url : https://c.ap1.visual.force.com/apex/inline1?id=0019000000BqDd1&core.apexpages.devmode.url=1. But I want this to be in the same account detail page[without refreshing the parent page of course], only to reflect the saved visualforce page. Here is the code :

public PageReference Save(){ Update lstAcct; return null; }

  • Your question is broken. Please update it. – Vignex Dec 15 '14 at 18:20
  • updated the question @ Vignex – user59759 Dec 15 '14 at 18:23

To avoid page getting redirected to different URL, you should not return PageReference as the return value for Save() method. Instead replace Pagereference with void and RERENDER the section of the page that you tried to save through rerender attribute of apex:commandButton from the Inline Visualforce page.

(i.e) Updated code should be

public void Save(){
 Update lstAcct;
  • tried this, but its not working....can u please help me get rid of this part in url core.apexpages.devmode.url=1? – user59759 Dec 15 '14 at 18:32
  • core.apexpages.devmode.url=1- This is not related to your scenario. This is because you've enabled developer mode in your user record. For your scenario, you need not construct any URLs. For more details, I can suggest only after seeing your complete code of your Page and Class – Vignex Dec 15 '14 at 18:35

Did you activate the devmode on your user profile, Give a shot like this go to User info and uncheck the Devmode and then try. even though it gives error.

in your custom method frame the url where it needs to land.

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.