Topic
  • 2 replies
  • Latest Post - ‏2013-03-20T08:07:45Z by SystemAdmin
SystemAdmin
SystemAdmin
5842 Posts

Pinned topic Saving a Read Only Field

‏2013-03-15T12:07:57Z |
I have a field on the screen that I have made read only. I am setting the value of that field in code based off of a user action. When I go to save my record, all changes are saved except the read only field. How would I get the value of that field to save?
Updated on 2013-03-20T08:07:45Z at 2013-03-20T08:07:45Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    5842 Posts

    Re: Saving a Read Only Field

    ‏2013-03-19T18:47:45Z  
    Hi,

    Did you tried using the NOVALIDATION flag while setting the value of readonly field in code.

    Example:

    String value="descriptionvalue";
    Mbo currentMbo = (Mbo) mboSet.getMbo();

    • currentMbo.setValue("DESCRIPTION", value, Mbo.NOVALIDATION);
    • currentMbo.setValue("DESCRIPTION", value, Mbo.NOACTION);
    • currentMbo.setValue("DESCRIPTION", value, Mbo.NOACCESSCHECK|Mbo.NOVALIDATION);

    Thanks,
    Pranit
  • SystemAdmin
    SystemAdmin
    5842 Posts

    Re: Saving a Read Only Field

    ‏2013-03-20T08:07:45Z  
    Did you check if that field is persistent or not?