Pages

August 23, 2018

Disable automatic asset/location population in Work Order and Ticket applications

Maximo has a feature that automatically populates the asset when a user enters a location and viceversa. This is a feature may be useful for most clients but some other clients don’t like this behavior. Unfortunately Maximo does not have a built in switch to disable this.

The best solution to solve the problem is to use an automation script with an attribute launch point.
This is documented in this post but i made few improvements to it.
My script resets the asset only when the location has been changed and ASSETNUM is changing from null to a new value. This is because there is already a warning dialog when the asset is changed from another value.

This is how I have defined my automation script. I have tested it for Service Requests application but it should work fine for Work Orders as well.

  • Script: SR_LOCATION
  • Language: python
  • Launch Point: SR_LOCATION_ACTION
  • Object: SR (this could be also be WORKORDER or TICKET)
  • Attribute: LOCATION
  • Event: Run Action (Validate should also work)
  • Variables: none

Script:
from psdi.mbo import MboConstants

if not mbo.isNull("LOCATION"):
  if mbo.getMboValue("ASSETNUM").getPreviousValue().asString()=="" and not mbo.isNull("ASSETNUM"):
    mbo.setValueNull("ASSETNUM", MboConstants.NOVALIDATION_AND_NOACTION)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.