Create a SuiteScript that will Refresh and Redownload the Page and Contents

  1. Create a Client Script
    Name: Refresh Cache
    ID: customscript_refreshcache
    Recalc Function: RefreshCache
    Script File:
    function RefreshCache()
    {
    window.location.reload(true);
    }
  2. No need to deploy Client SuiteScript since this will be called by the button generated by the User Event Script
  3. Create a User Event Script
    Name: Button Cache
    Before Load Function: beforeLoadScript
    Script File:
    function beforeLoadScript(type, form, request)
    {
    form.setScript(‘customscript_refreshcache’); //reference the Client SuiteScript
    form.addButton(‘custpage_clearthatcache’, ‘Refresh Cache’, ‘RefreshCache()’ ); //add button
    }
  4. Deploy SuiteScript to the record desired (Deploy Script button)
    Applies To: -any-
    Roles: -any role you wish to apply the customization-

Leave a comment

Your email address will not be published. Required fields are marked *