22. Februar 2013 15:30
function showCustomAlert(message, level)
{
var attributes = Xrm.Page.data.entity.attributes;
var notificationsArea = document.getElementById('crmNotifications');
/*clear out notification area*/
notificationsArea.SetNotifications(null, null);
if (notificationsArea == null)
{
alert(message);
return;
}
/*
The integer is the notification type
1 = Error
2 = Warning
3 = Info
notificationsArea.AddNotification("<;unique value>;", 3, "","Your text here");
*/
/*Create some notifications*/
if (level == 1) //Error
{
notificationsArea.AddNotification("1", 1, "1", message);
}
if (level == 2) //Warning
{
notificationsArea.AddNotification("2", 2, "2", message);
}
if (level == 3) //Info
{
notificationsArea.AddNotification("3", 3, "3", message);
}
}
22. Februar 2013 15:53
var notificationsArea = document.getElementById('crmNotifications');
var notificationsArea = $find('crmNotifications');