Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Javascript to show FormNotification

$
0
0

This Javascript snippet on the Street field displays the yellow message the top:

function NotificationTop (msg,type) {
Xrm.Page.ui.setFormNotification(msg, type);
}

I love the customer experience of this message and once it has been added as a Library via Web Resource, it can be reused on many fields by adding it as a Form Library on your form, then implementing it on a field by:

    1. Clicking the Edit button

  1. Then in the Parameters box, put your desired message text in quotes, then either ERROR, WARNING, OR INFORMATION as the message type.  This last part determines what icon appears; ERROR gets a red X, WARNING gets a exclamation mark, and INFORMATION doesn't show an icon.


With that all said, I would like to improve it to want it to behave similar to what happens when you try to advance in a Business Process Flow without providing the required fields.  It has two features:

  1. Clears after a # seconds
  2. Has a X so the user can clear it on demand
  3. Also ... would like it to not appear when the record is first created; in essence, that's not really "on change" but the system is displaying it anyway.  I would like it to only show after the record is saved and the user comes back in and changes the address.

How would that Javascript need to change to accommodate 1 thru 3 above?


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>