• 2 replies
  • Latest Post - ‏2012-11-09T18:58:46Z by KaranBal
22 Posts

Pinned topic Alert Message

‏2012-11-09T05:53:16Z |
User saves a changes in the elements. Postprocessing script starts and if there are errors, I use the function throwValidationError().
Is there a possibility to throw alerts?
Updated on 2012-11-09T18:58:46Z at 2012-11-09T18:58:46Z by KaranBal
  • babinag
    91 Posts

    Re: Alert Message


    What means alerts?

    You can use data entry html to show alerts.
    data entry

    this is looks like
  • KaranBal
    108 Posts

    Re: Alert Message

    Hi Andrey,
    Like Alexey, I am not sure what you mean by alerts. I can think of 3 possibilities here:

    1. The administrator(or someone else) getting a notification when the exception occurs:
    I hope you mean this because setting it up should be rather simple. You can use functions like sendHTMLEmail, sendEmail, and getUserEmail in the post processing script to achieve this. Visit the information center for details.

    2. Even if there is no error, then the user gets notified when certain criteria are met(as an alert):
    This request is a programming issue and not MDMCS. You can work with your developers to put in a try catch block such that:
    2.1. If your criteria(pre-defined in post processing script as a combination of item attribute values) is met, then the user gets an alert message just as he would get an error.
    2.2. To overwrite this alert, you can define a custom attribute in the spec e.g. a boolean named CheckAlert. Your login can be built such that if the CheckAlert is set to false, then the validation mentioned in 2.1 does not happen.

    3. Throwing a pop-up alert message:
    If this is what you mean, then that will be an application server question rather than MDMCS since the UI runs as an application server JVM. For WAS, you can do the following(highly discouraged):
    3.1. Within the ccd.war deployment in WAS profile, write a custom jsp for what you want the alert to be.
    3.2. Edit the web.xml file of WAS such that when the desired criteria is met, you get the alert.
    I have never tried it and would warn against this. Plus this is not supported and so MDMCS Support will not be able to assist you with any complications that may arise. This may cause unintended consequences and can possibly do a lot of harm if there are any user error.