RSS

Showing custom Alerts in notifications area

16 Apr

If you need to write your alerts in javascript using the notifications area it really easy, here’s an example

var mep = 1;

function set_alert() {
    var notificationsArea = document.getElementById('crmNotifications');
    if (notificationsArea == null) {
        alert('div not found');
        return;
    }

    if (mep == 1) {
        notificationsArea.AddNotification('mep2', 2, 'source', 'Warning message');
        notificationsArea.AddNotification('mep3', 3, 'source', 'Info message');
        notificationsArea.AddNotification('mep1', 1, 'source', 'Critical message');
        mep = 2;
    }
    else {
        notificationsArea.SetNotifications(null, null);
        mep = 1;
    }
}

Here’s an image of the result

Advertisements
 
4 Comments

Posted by on April 16, 2012 in CRM 2011, Javascript

 

Tags: , , ,

4 responses to “Showing custom Alerts in notifications area

  1. Manish Mistry

    August 22, 2012 at 4:29 am

    Beware, this is one of those cool-but-unsupported customisations!

     
    • Isaac Sultan

      September 6, 2012 at 1:02 pm

      Everything in Microsoft is unsupported, that’s why them provide support hahaha =)

       
  2. Hadas

    November 20, 2012 at 8:56 am

    Big Like !

     

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

 
%d bloggers like this: