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 this flag is selected, a non-persistent attribute named DESCRIPTION_LONGDESCRIPTION is created and can be get/set as any other attribute.

However, if you just set its value calling the setValue method of the Mbo it will not update the long description as expected.

mbo.setValue("DESCRIPTION_LONGDESCRIPTION", "Test long desc")

To apply the long description, you also have to set the HASLD flag like this.

mbo.setValue("HASLD", True)
mbo.setValue("DESCRIPTION_LONGDESCRIPTION", "Test long desc")

It took some time to discover this flaw so I hope it can be useful if you have the same issue.

Set long description from automation script

Leave a Reply

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

Scroll to top