Create Cutom Button In CRM without using ISVconfig


We know that we can create Custom ISV button on entity toolbar, but if you want you can also create a Hyperlink button on entity toolbar using DOM without using ISV config file,also can call your JS function on your on form onload on click of that.Before starting this let’s first check structure of  crmMenuBar ( In my example I am creating this button in Account Entity)

So using JS we can add a new TD element and can set it’s innerHTML property to create a hyperlink button. And if you want to call a JS function that you can do that just create a JS function on CRM form like below

Funcion on form load

MyDemo=function()

{

alert(‘Hi’);

} 

Code to create hyperlink control

var _Table = document.getElementById(‘mnuBar1’);

var _TbleBody = myTable.getElementsByTagName(‘tbody’)[0];

var _TR = myTable.getElementsByTagName(‘tr’)[0];

var _TD = document.createElement(‘td’);

_TD.innerHTML =”<a href=’javascript: MyDemo ();’> Test </a>”

_TR.appendChild (_TD);

After this the structure will be like

Also you can add style to this button just like as CRM control, hopefully I will cover this in my next post.

But surely this is Unsupported 😦

Advertisements

2 Comments

Filed under MS CRM 4.0

2 responses to “Create Cutom Button In CRM without using ISVconfig

  1. Eran

    The only question is why would you do this? It’s completely unsupported and I don’t see any advantage to this over using a standard ISV button… Could you maybe explain in what scenario this would be better than the standard ISV button?

    • mahenderpal

      Yes, surely it’s unsupported customization and not best option.But the though of creating a button which right aligned, is behind this experiment. 🙂

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