Maximo Scripting – Validation of non-persistent MBOs

This post is an excerpt from the Maximo 76 Scripting Features guide.

Adding validation to the virtual (aka Nonpersistent) mbos (on execute 7609 feature).

In this sample we are going use the change status dialog from the Asset Application to validate if the memo is filled in when the Asset status is set to BROKEN.

We will write a Object launch point script – MEMOREQD, which will validate on OK button press of the dialog that memo is required for status BROKEN. The event will be “save/add”. This will map to the “execute” call back for non-persistent MBOs. The object name would be ASCHANGESTATUS. We used Python for this sample.

if mboset.getMbo(0).getString("status")=="BROKEN" and mboset.getMbo(0).isNull("pluscmemo"): 
   service.error("memo", "reqd")

Note the use of the “mboset” variable, which is leveraged to get the current Mbo at 0 index. Now try the change status dialog to see if it throws the memo#reqd error when you do not specify the “memo” for BROKEN.

Maximo Scripting – Validation of non-persistent MBOs

One thought on “Maximo Scripting – Validation of non-persistent MBOs

  1. Hi,

    Good day. Just want to ask if how we can get the query of a non persistent object of an Integration. For example, the MXGLTXN object we need to get the XML values for this.

    Thanks

Leave a Reply

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

Scroll to top