Reading data when calling a new form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maxniebieski
    Junior Member
    • Jul 2024
    • 16

    Reading data when calling a new form

    Hello Everyone,

    I'm trying but I don't know if I'm thinking correctly, I want it to show the value read from the database when a new entity form is called, e.g. a new case, in one of the defined fields. (not after saving). I tried editing entity files in entityDefs and clientDefs but it freezes my system, can I ask for some tips?

    Code:
    "fields": {
        "pozostaleurlopy": {
            "type": "text",
            "rowsMin": 2,
            "cutHeight": 200,
            "readOnly": false,
            "inlineEditDisabled": false,
            "isCustom": true,
            "default": null,
            "formula": "var user = record.get('user'); if (user) { return 'URLOP: ' + user.cPozostalyurlop + ' UNÅ»: ' + user.cCLeaveOnRequestCurrent; } else { return ''; }",
            "onBeforeSave": true
        }
    }
Working...