I have created a custom "Resolve Case" window that replaces the CRM's default case resolving window. What I have done is I've replaced the Resolve Case ribbon button with my own button which opens a custom HTML page when clicked. Then when the user press Resolve button on that page a SOAP message is created to resolve that particular case. After the SOAP message I call window.close() to close the "Resolve Case" window. After that I'm calling location.reload() so that the main form is reloaded and ribbon is refreshed. So it works (in user's point of view) just like the default case resolving window.
Now here's a problem. If the user, after resolving a case, reactivates it and then resolves it again I'm getting the following message (popup alert from browser):
"To display the webpage again, the browser needs to resend the information you've previously submitted. If you were making a purchase, you should click Cancel to avoid a duplicate transaction. Otherwise, click Retry to display the webpage again."
I discovered the problem is because I have used location.reload() to reload the main form and thus there occurs a duplicate form submission. I've tried to use window.location = window.location, location.href = location.href, etc. instead of location.reload() but none of them are working for me. They seemed to refresh the main form (at least it blinked), but the ribbon didn't refreshed. I also tried to use Xrm.Page.ui.refreshRibbon(), but it didn't make a difference either.
I searched a solution from internet and people are talking about Post/Redirect/Get pattern. I couldn't find any clear examples how to implement it though so I was hoping if you could help me to understand it and how to use it in this particular case.
More information and code samples will be provided if needed.