Maximo Open Forum

 View Only
  • 1.  Set Value on Non Persistent Field

    Posted 12-07-2023 04:26
    Edited by Pavan Uppalanchu 12-07-2023 08:50

    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
    ------------------------------



  • 2.  RE: Set Value on Non Persistent Field

    Posted 12-07-2023 08:51

    Sorry guys, 

    It's working now :) I made some manual mistake ..!!!



    ------------------------------
    Pavan Uppalanchu
    IBM
    ------------------------------



  • 3.  RE: Set Value on Non Persistent Field

    Posted 12-07-2023 09:00

    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
    ------------------------------



  • 4.  RE: Set Value on Non Persistent Field

    Posted 12-09-2023 12:18

    Hi Steven,

    sorry to consume your time.Thaks a lot for your reply :)

    Yes, It's a non-persistent custom field. I forgot to check my script line by line. I am updating sone other non-persistent custom field too 



    ------------------------------
    Pavan Uppalanchu
    IBM
    ------------------------------