Freigeben über


Viewing Microsoft CRM's DHTML Source Code

So something cool is that Microsoft CRM renders all of it’s pages in DHTML. One of the coolest things that the product group did was the new OnLoad event. So what does that mean to you?

 

So let’s talk about this… How would you like to be able to control a screen with a little bit more ability to tweak than you have today? I personally love the Internet Explorer Developer Toolbar. But sometimes brute force is better than the pretty stuff that it exposes.

 

So lets just say for some reason you want to remove some things from the left navigation bar, but want to leave the entity in place. Tomorrow’s post will have that script for your pleasure. Today is all about how we got here…

 

So in this case, we want to remove the Quotes, Orders and Invoices from the Contact Entity. But we want to leave them for the Accounts. Under normal circumstances, we would remove the item from the security role, but that takes it from both entities.

 

So how do we get here?

 

Lets open a Contact Record up.

 

 

Then hit the F11 key on the keyboard.

 

 

Now you should see an Address Bar.

 

 

Now hit CTRL + N at the same time.

 

 

You should now see the typical Internet Explorer Menus and Toolbars.

 

Once that is done, select View | Source and you can see all of the DHTML for page.

 

The code as you can see is not formated for readability. Paste the code into your handy Visual Studio and Press Control+K then Control+D to format the HTML Code.

 

But here is a picture of what we did with this new found knowledge... We managed to use OnLoad to remove the Quotes, Orders and Invoices from the navigation pane of the contact form. (While leaving it 100% intact for Accounts and on the Wűnderbar.)

 

And a blow up of that:

 

Tomorrow's post is going to have the script used to hide Quotes, Orders and Invoices.

Comments

  • Anonymous
    February 20, 2006
    Ben,

    Nice trick.  There is a lot of cools things that we can do to manipulate the CRM forms in this regard.  Do you know if these type of customizations are supported and will they pass the ISV product certification tests?
  • Anonymous
    February 20, 2006
    John,
    I have NO idea. I don't play much in the supported world. Your best bet would be to open a support case and ask support. The world I live in doesn't car much about support. My guess would be that this is supported and would pass, but that decision is not mine to make. :-)

    Thanks
    Ben
  • Anonymous
    February 21, 2006
    If you didn't read yesterday's post, you may be a bit lost on how we got some of the items we are using...
  • Anonymous
    February 25, 2006
    There is a $20 (US) tool called Instance Source that is pretty invaluable shows all source in a tabbed interface.