Hi

I had this scenario where I had to add a Notification on form.

Notification was required to be a hyperlink, on click of which, I was asked to get focus on a tab.

But this can be done similarly to navigate to a URL, navigation Pane Item etc

Steps:

1. On Form Onload, add this script:

function AddNotification()
{

var notificationsArea = document.getElementById(‘crmNotifications’);

notificationsArea.AddNotification(“1”, 3, “1”, “<a href=’#’ onclick=’Xrm.Page.ui.tabs.get(<tabname>).setFocus();’ title=’Test’ ><u><Message to be displayed></u></a>” );
}

Generic layout : Addnotification(Param1, Param2, Param3, Param4)

Param1: UniqueId for notification

Param2:

1. Critical notification

2. Warning notification

3. Info notification

Param 3: I tried to search for this. But not able to figure out yet what this is about. I tried adding a text, number and even left it as such with blank quotes(”). All of these worked

Param 4: Message you want to display. In my example I replaced message with an anchor tag to make my Display text behave as a a link. Anchor tag was not adding an underline to Displaytext, so I added <u> tag.

Note: This is unsupported customization as AddNotification() is not listed in SDK

Hope it helps someone.

Advertisements

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