To prevent java classes from later setting it, I would use the NOSETVALUE flag on the attribute instead. This is used by the MIF to prevent java classes from overriding something provided in the message payload. Something like:
mbo.setValue("PERSONID","MAXADMIN")
mbo.setFieldFlag("PERSONID",mbo.NOSETVALUE,True)
DELAYVALIDATION is also used by the MIF but is intended to handle scenarios where values may not be set in the correct order. It tells the framework we don't want the validation to fire until everything has been provided. For example, if you tried to set the ASSETNUM before the SITEID, the ASSETNUM validation would normally fail because it would try to find that asset in a correct status with a NULL siteid. By delaying validation, we can wait until the SITEID has been set and thus the validation occurs as expected.
------------------------------
Steven Shull
IBM
------------------------------
Original Message:
Sent: 02-10-2025 08:00
From: Phil Runion
Subject: DELAYVALIDATION MBO Constant
DELAYVALIDATION is a "new to me" MBO Constant. I regularly use NOACCESSCHECK and NOVALIDATION but DELAYVALIDATION isn't one that I was aware of. A smart developer recently leveraged this to make one of my scripts work perfectly. When setting a value with DELAYVALIDATION any processing that occurs after this script executes cannot set to this field value. In the correct situation, this is a smart way to short-circuit out-of-box logic that runs after an automation script.
Example: mbo.setValue("PERSONID","MAXADMIN",mbo.DELAYVALIDATION)
#Administration
#Customizations
------------------------------
Phil Runion
Projetech
------------------------------