Handle Refresh Events on Summary Page

By | March 16, 2017

Refresh is a term that describes the process of renewing the screen contents on a monitor. As the refresh rate increases, the image becomes clearer. The refresh method is used almost in every application or system but in a different way.
On other hand, this refresh method sometimes create a problem in application e.g. Sage CRM. We have seen Multiple Cases with Same Reference ID being created in CRM just because of Refresh method. See the records from Database in the below snapshot.
New Stuff: Mask a Text Field into Time Format (MM:SS) using jQuery

After doing some research, we got to know that it was happening due to immediate page refresh of newly created case. The Refresh Events on page are as mentioned below-
1.    Mouse Right click – Reload/Refresh option
2.    Browsers Reload button
3.    Pressing F5 key from keyboard
4.    Pressing Ctrl + R
One more thing we noticed here is if we click on the Summary Tab of newly created case and once the page is reloaded then multiple cases will not be created. So, to prevent this issue we’d written JQuery code with the help of Key Values from the URL.
By using this code, the Case Summary Tab will get clicked automatically once the record is saved. Refer the below code and add it in your Custom.js Page.
$(‘.TABON’).each(function()
            {
                        if($( this ).text()==’Summary’)
                        {
                                    var sAct= getQuerystringNameValue(“Act”);
                                    if(sAct ==”1192″)
                                    {
                                                $(this).click();

//autoclick on Case Summary Tab to prevent multiple case creation from refresh events

                                    }
                                    else
                                    {
                                    }
                        }
            });
Also Read:
1. Save time with Case Suggestions on Customer Portal
2. Sending an e-mail to customer Case is created
3. Remove New Company and New Person buttons from the New Case screen
4. Restrict Inactive Companies & Contacts when Adding a New Case
5. Generating Case Reference Number without User Id