The NOACCESSCHECK is designed to suppress some read-only scenarios. If the entire MBO is flagged as read-only, like we do when we don't intend for the records to be modified at that point, the NOACCESSCHECK is insufficient. On out of the box objects, you need to be really cautious about doing this because it could cause issues.
Assuming this is your own non-persistent attribute and your confident it won't try and update other things, you can try to change the flag in your script prior to setting the value and then set it back to read-only.
mbo.setFlag(mbo.READONLY,False)
mbo.setValue("YOURFIELD","YOURVALUE",mbo.NOACCESSCHECK)
mbo.setFlag(mbo.READONLY,True)
------------------------------
Steven Shull
IBM
------------------------------
Original Message:
Sent: 12-07-2023 04:25
From: Pavan Uppalanchu
Subject: Set Value on Non Persistent Field
Team,
I have build some logic and set value on non-persistent field in Budget Monitoring application. The script is written on Init Value Object Launch Point. The script working fine until the budget record is closed. when Budget record status is changed to CLosed, I am getting an error when opening budget record - "The BUDGET object is read only. Verify the business rules for the MBO or MBOSET object."
In script, when setting values on Non-Persistent Fields, I have even used MboConstants.NOACCESSCHECK and MBOCONSTANTS.NOvalidation.
Regards,
Pavan Uppalanchu
#Analytics
------------------------------
Pavan Uppalanchu
IBM
------------------------------