dynamics-crm-2011

Register tabStateChange event via javascript in CRM 2011


Is there a supported way to register tabStateChange events in javascript via the Xrm.Page API rather than through the form UI, similar to addOnChange for attributes? Something like:

Xrm.Page.getControl("controlname").addTabStateChange(function(){});

Solution

  • Yes. I am not 100% sure it's supported, but it is certainly possible. Here's an example:

    Xrm.Page.ui.tabs.get(0).add_tabStateChange(function(){alert('test')})