scripting

Improved record change tracking using Audit feature

In a previous post, I demonstrated how the Maximo audit tracking can be used to display the updates made on a record enabling the audit and adding a “history” tab in the application. This technique is quite common but has a major drawback; it displays all the audited field in a row even if only […]

How to create follow-up Work Order with script

Maximo provides a useful action in many applications to create a follow-up work order or a linked service request from many applications. The same result can easily be automated using the WO.createWorkorder() or the Ticket.createWorkorder() API methods. The standard WO2WO or TICKET2WO crossover domains can also be used to copy some attributes from the source […]

Handling workflow from automation script

If you need to handle workflows (start, stop, route, etc.) from an automation script you can use the following two Maximo API classes: WorkFlowService and WFInstance. Here are few examples. The WorkFlowService.initiateWorkflow metod can be used to start a workflow: To stop an active workflow you can use WFInstance.stopWorkflow method: To route a workflow I […]

Set long description from automation script

Today I have discovered a strange behavior when setting long descriptions from an automation script. You know that almost every DESCRIPTION field in Maximo has a corresponding “Long Description” field that is a CLOB attribute that can hold big amounts of text. This is driven by the “Long Description Owner” checkbox in Database Configuration. When […]

Display custom message from automation script

There is a well known technique to display a custom error message from an automation script. It requires to create the custom message in the Messages dialog of Database Configuration application and then to trigger the display of it throwing an exception by setting errorgroup/errorkey or using the service.error method. This technique is well described […]

Script to check if current user is in a Security Group

A typical business case is to prevent editing of some specific fields to a set of organizational roles in Maximo. This is typically achieved by implementing attribute data restriction or conditional UI. However, if you need more control over what field should be readonly and when, you can use an automation script on the INIT […]

Setting multiple fields as readonly with script

Sometimes you may need to allow some users to update only few fields. This may be hard to achieve using conditional UI and conditional expressions. In the following snippet I’m setting all fields as readonly except DESCRIPTION and STATUS if the current user is in MANSUP security group. Attach the script to the Initialize event […]

Scroll to top