Syed Umar AnisMaximo EAMMaximo: Suppress warning message dialog through Automation Script
Syed Umar AnisMaximo EAMMaximo: Suppress warning message dialog through Automation Script
Maximo EAM

Maximo: Suppress warning message dialog through Automation Script

As we automate a task through script by invoking standard functionality, we may get a warning dialog in certain cases. The invoked functionality could have been designed to be used in an interactive way, but we want to run it in the background. To get around this problem, we can suppress the warning dialog using postUserInput method in the MXApplicationYesNoCancelException class.

For example, setting the schedule date on Assignment record can trigger a warning about FNL (finish no later than) or SNE (start not earlier than) constraints on the Work Order. To suppress the warning, call postUserInput before setting the schedule date.

exp = MXApplicationYesNoCancelException("schedwoschedfinconst", "eg", "ek")
exp.postUserInput(MXServer.getMXServer(), 2, mboset.getMbo(0).getUserInfo())

The second parameter in postUserInput should be one of the following depending on the dialog action you want to trigger:

CANCEL4
NO16
NULL-1
OK2
YES8

Hi, I’m Umar

Leave a Reply

Your email address will not be published. Required fields are marked *