Advertisements
Home > CRM 2011, JScript > Handling Tab click event in CRM 2011

Handling Tab click event in CRM 2011

Hi,

We can fire our own Jscript function on CRM tab click. Below are the steps

 How to get ID of Crm Form Tab :-

  • Get the ID of the ‘Tab’, using IE browser Developer Tool (i.e., Click F12)  (See image above)

Code :-

  • Attach “onclick” event handler on page ‘OnLoad’ method

function Form_onload() {
//Attach ‘onclick’ event handler to “Tab”
var linkGeneral = document.getElementById(“tab0Tab”);   //’tab0Tab’ is the ID of ‘General tab’
if (linkGeneral) {
linkGeneral.attachEvent(“onclick”, tab_onclick);

}

}

Function tab_onclick(){

//This function fires on Tab Click;

//Write your code

}

Hope it helps 🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: