When a validation or business rule is implemented, it is sometimes necessary to display a message (error, information, or warning) as result.
For this, you can use existing messages that come out of the box with MAXIMO, or you can create custom messages.
Using errorgroup and errorkey variables
You can use the implicit variables errorgroup and errorkey to display the messages (Maximo 7.5)
# No parameters
errorgroup = "system"
errorkey = "CannotDelete"
# With parameters
params = [mbo.getString("ASSETNUM")]
errorgroup = "designer"
errorkey = "generic"
Using ScriptService class
You can use the implicit variable service, which is an instance of com.ibm.tivoli.maximo.script.ScriptService class to display the messages (Maximo 7.6)
# No parameters
service.error("system", "CannotDelete")
# With parameters
params = [mbo.getString("ASSETNUM")]
service.error("designer", "generic", params)
Note: The message suffix will indicate the type of message to display:
E: ErrorI: InformationW: Warning
If you found my post interesting or useful and just want to say thanks, you can always buy me a coffee.



