Maximo Open Forum

 View Only

 Control when a Service Warning is displayed

  • Administration
  • Customizations
Clark Carradine's profile image
Clark Carradine posted 09-21-2022 15:03
1  How can I control when a Warning is displayed when set in an automation script.

I have an action script tied to a button in an dialog box. 
I am using the service.setWarning("BC","GenericWarning",['These attributes have null values '+nullAttributes]) and then closing the dialog.
service.closeDialog()

The message will get displayed at some random later time. Usually if I press the Save button, I want to display a Message Box when the dialog box is closed. What can I do to fetch the message?

--Clark Carradine​
Prashant Sharma's profile image
Prashant Sharma
This automation script is using Object Launch Point? What is the event when you are calling it? 

Warning coming at random time is not something which service.setwarning() does If your event and launch point is correct.

Thanks,
PS
Jade Warren's profile image
Jade Warren
I have found it helpful instead to leverage the following to display user messages (this code displays the desired text in a predictable manner without halting execution:

session = service.webclientsession();
session.showMessageBox("MESSAGE_GROUP", "MESSAGE_KEY", ["Message text here"]);
Bruno Portaluri's profile image
Bruno Portaluri
I agree with Jade's answer.
Here is my post with some details.