Search This Blog

Friday, June 5, 2009

Add an information message in CRM form

With the following script, you can add an information message to a CRM form

var newcontent = document.createElement("div"); = "message"; = "solid 1px black"; = "10px"; =
"10px"; = "0px"; = "4px";
newcontent.innerHTML =
"<table border="'0'" cellspacing="'0'"
src="'/ico/16_info.gif'/" /></td><td
is an information

var scr = document.getElementById(elementId);
scr.insertBefore(newcontent, scr.firstChild);

Juste replace elementId with:
"areaForm" to place the message on top of tabs
"tabX" to place the message in the tab X (X is the index of the tab)

Si had put a easier and more integrated solution in the comments. So I put his solution right here to avoid further navigation. Thank you, Si!
Nice, just used this but you can see from the screen shot that inserting
the div as the first child of areaFrom makes the bottom of the form disappear,
you can't see the bottom of the scoll bar is not visible.
I've checked the form dom and there's a nice div called Navigation that is
already styled with a yellow backgroundHere's your code altered slightly that
allows CRM to format the screen correctly, it can also be called multiple times
and will update the text.

var sText = 'Hello World!';
var elementId = 'Notifications';
var id = 'divMessage';
var src = document.getElementById(elementId);
var newcontent = document.createElement("span"); = id;
newcontent.innerHTML = "<table><tbody><tr><td><img src="/_imgs/ico/16_info.gif" /></td><td valign="'top'">" + sText +
"</td></tr></tbody></table>"; = "";
var previous = src.firstChild;
if (previous == null previous.attributes['id'].nodeValue != id)
if (src.childNodes.length == 0)
elsesrc.insertBefore(newcontent, src.firstChild);
src.replaceChild(newcontent, previous);

Thursday, June 4, 2009

New tool! Header Builder


I developed a new tool, a small one this time.

It simply allows you to create a new header for Microsoft Dynamics CRM 4.0 application.

Some customers don't want to highlight the name and logo of the solution and prefer to put their own company logo instead.

With this tool, you can choose an image and merge it with the header background of Microsoft Dynamics CRM 4.0.

The programm manages transparency, size and position of the image on the header background.

You can then save the new header iamge and replace the original one located in CRMWeb\_imgs\masthead.jpg (don't foget that it is unsupported and you must backup the original file)

No screenshot for the moment