Custom messages on standard lists

By | August 6, 2011

Some days ago I came across this question on one of the CRM forums. The requirement was like when I select company and go to People tab, if no primary person has been set for that company then display the message “Primary person has not been set”.

I remember I did something similar to this on Addresses tab under the Person entity. Whenever we want to have such messages first thing that comes to our mind is writing ErrorStr on create script of any field. However in this case we can write CreateScript in field on list block, however i dont want it to appear like error message, just an information i.e. an HTML I can modify. Sharing my reply to that forum here for anyone who is interested in this functionality.

You can add custom message as given below.


//Format the message bar
var MsgHTML = “< Format the HTML for message bar here >”;

//Add the message bar to list
If(< primary person not found >)
//Add message on the screen
//Do nothing

Add this script to create-script of any field on list. To format the custom message in attractive manner you can refer below post on our blog site.

If you find this content useful, please drop us an email at