Tuesday 1 November 2022

Special Automation Scripts NEW, SAVE,DUPLICATE,AFTERDUPLICATE | Maximo


 <MBONAME>.NEW

 <MBONAME>.DUPLICATE

 <MBONAME>.SAVE


Introduced in 7613.

 <MBONAME>.AFTERDUPLICATE

IBM Maximo Autoscripting Guide – OBJECTNAME.DUPLICATE Script (ibm-maximo-dev.github.io)

Restrict a User to Delete an Attachment from an Approved PO | Maximo

The requirement is to lock the record so that nobody can delete a record if the purchase order is approved.

And the solution is with a small automation script on DOCLINKS object:


object: DOCLINKS

event: BEFORE SAVE

Type: Object Launch Point

Script: Jython


owner=mbo.getOwner()

if owner and owner.getName()=="PO" and owner.getInternalStatus()=="APPR" 

    service.error("","Purchase Order is approved. ")



Also ideal to control it via the signature option, create a new signature option from the application designer and grant access using the relevant security groups then just use it in your code. thanks to Steven Shull.

owner.sigopGranted("DELETEATTACH"):