Avoid editing of a child table

In some cases you need to prevent the editing of a child table (add/change/delete) in a Maximo application. For example, you want to prevent adding or changing records in the “Multiple Assets,Locations and CIs” table of the Work Order Tracking application when a work order is in status INPRG.

The probem can be easily solved with an automation script on the Initialize event of the WORKORDER object that checks the status to the record and uses the MboSet.setFlag() method to mark the child MboSet as READONLY.

Open Automation Scripts application and select Create > Script with Object Launch Point

  • Launchpoint: CXTEST
  • Object: WORKORDER
  • Event: Initialize Value
  • Script language: python
  • Script:
if mbo.getString("STATUS") == "INPRG":
  multiasslocSet = mbo.getMboSet("MULTIASSETLOCCI")
  multiasslocSet.setFlag(mbo.READONLY, True)

Now if you try to click on the New Row button of the “Multiple Assets,Locations and CIs” table you will get the classic error message:

BMXAA0024E – The action ADD is not allowed on object MULTIASSETLOCCI. Verify the business rules for the object and define the appropriate action for the object.

Avoid editing of a child table

One thought on “Avoid editing of a child table

  1. While very useful, I’d like to customize or override the error message here. I feel like there’s an automation script technique that would let me do that, but it’s not coming to me.

    If worse comes to worse you could modify the message for BMXAA0024E

Leave a Reply to Dave Peplinski Cancel reply

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

Scroll to top