ReadOnly enum that can be set programmatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • czcpf
    Senior Member
    • Aug 2022
    • 160

    ReadOnly enum that can be set programmatically

    I am seeing a weird result.

    If i specify my enum field as readOnly in entityDefs, and set the field programatically in a dynamic handler like so:

    setTimeout(() => this.model.set('timerTestResult', 'FAIL'), 1);

    The field updates in GUI as expected. However, when I save the record it is not set. If I remove the readOnly option from the entityDefs everything works properly when setting the field programatically.


  • item
    Active Community Member
    • Mar 2017
    • 1476

    #2
    Hi,
    Hi Yuri, it's a normal behaviour for a "readOnly" field ? EspoCrm 8.0.5 step : myField : readOnly custom handler : myField = moment(); result : on front-end : myField = today after save myField => null But if myField : not readOnly result : on front-end : myField = today. after save myField = today So, if

    If you could give the project a star on GitHub. EspoCrm believe our work truly deserves more recognition. Thanks.​

    Comment

    Working...