System Behaviour refresh interval does not obey hideColumn

In CRM 7.3 SP3 I have added some code to hide a few columns depending on the context and it works fine if I refresh the screen by clicking on the Cases tab or even pressing F5, however, if I set the new "Case refresh interval" value in System Behaviour to 60 seconds then when this refreshes the screen my columns are not hidden! Is this a flaw in my code or a flaw in this new auto-refresh mechanism?

<script>
$( document ).ready(function()
{
var T = crm.getArg("T");
if(T=="User")
{
crm.grids().hideColumn("case_assigneduserid");
crm.grids().hideColumn("case_elapsedtime");
crm.grids().hideColumn("case_bonus");
}
else if(T=="Company"||T=="Person")
{
crm.grids().hideColumn("case_elapsedtime");
crm.grids().hideColumn("case_bonus");
}

})
</script>

Thanks,

Mark.

  • 0

    Hi Mark,

    This looks to be an issue with the auto refresh mechanism. This works by adding a meta refresh tag to the page but it doesn't store the tab name field from the query string when it refreshes the page. I'd recommend you raise this as a bug with your local Sage support team.

    You could workaround the issue by adding the following code to the end of your script to refresh that page every 5 seconds for example:

    setTimeout(function(){
    window.location.reload(1);
    }, 5000);

    Just to note that this refresh interval feature has been in the product a good 17 years so it's not necessarily new. :)

    Regards,

    Kevin

  • 0

    Thanks Kevin! Your workaround works great and has the added advantage that I can place it in the code so that only the My CRM Cases List refreshes every minute (and the columns stay hidden), whilst the other Cases Lists in Team CRM, Company and People do not refresh.