You need to sign in to do that
Don't have an account?
Rajiv B 3
Unable to Refresh Current case from VF page
"Add PR Contact" is case detail page button it will create a Contact from VF page and same will be liked to the current case. It is working as expected but curent case is not getting automatically refreshd to see changes in the case.
Below is the VF page script
Could you please suggest me where I have to make changes to refresh the case automatically.
Appreciate for your suggestions.
Below is the VF page script
<script language="JavaScript" type="text/javascript"> function CloseAndRefresh(){ window.opener.location.href="/{!$CurrentPage.parameters.id}"; window.top.close(); } </script> <apex:pageBlockButtons > <apex:commandbutton action="{!save}" id="button" oncomplete="javascript:CloseAndRefresh()" value="Save"/> </apex:pageBlockButtons>
Could you please suggest me where I have to make changes to refresh the case automatically.
Appreciate for your suggestions.
I don't really see a reason you have to open a new page and close the current one if it's the same page.
Alternately, you could use an ActionRegion and reload the region and re-fetch the data in the Visualforce controller.
Actually users need to see a contact crate page as separate window where they can see the current case for required information to pass into the case page.
I tried with your suggesion but didn't work.
Thanks
https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
VF page has controller that will create the contact and same will update into the current case upon clik save...i am good till here.
Upon clik save on opened VF page it will create contact in the back end and add the same into the current case and vf will close.
But the problem is current case is not getting auto refreshed to see the lates changes (Updated contact details) where every time required manual refresh the case.