Form Level Notification

 If  you wan to show multiple notifications on form or you wan to clear notification from form then you can use following syntax : 

Syntax : 

formContext.ui.setFormNotification(message, level, uniqueID);

message   -  message which will be displayed on form.
level         -  There are 3 types of level (ERROR, INFO, WARNING).
                    Level will decide notification icon.
UniqueID - it is used when user want to clear notification.

Following is the example of setting and clearing notification on form:

 FormLevelNotification: function(executionContext) {
    var formContext = executionContext.getFormContext();
    
    //Set notifications
    formContext.ui.setFormNotification("Messsage for ERROR notification. ", "ERROR", "errorid");
    formContext.ui.setFormNotification("Message for WARNING notification. ", "WARNING", "warningid");
    formContext.ui.setFormNotification("Message for INFORMATION notification.", "INFO", "infoid");

    //Clear the notifications after the specified amount of time time e.g. 60 seconds
    setTimeout(
        function () {      
            formContext.ui.clearFormNotification("errorid");
            formContext.ui.clearFormNotification("warningid");           
            formContext.ui.clearFormNotification("infoid");
        },
        60000 //60 seconds
    );
} 

Comments

Popular posts from this blog

Accessing Fields on QuickView Form through javaScript

ADF - (Part 2) Integrate Data From CRM to External system

ADF - (Part3) Integrate Data From CRM to External system Using Stored procedure