Announcement

Collapse
No announcement yet.

Make Field not visible if current user is the same user who last modified it

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Make Field not visible if current user is the same user who last modified it

    I have 2 Boolean fields Vetted and Vetted 2 for custom Entity 'New Applicant'. The user who vets the first time must not be able to vet another time (its like he's approving twice which isn't logical) so if user A check 'Vetted' he must not see Vetted 2. I am not being able to prevent the user from seeing Vetted 2 via dynamic logic because selecting field Last Modified forces you to choose a specific user from the list.

    So 1) I went to custom/Espo/Custom/Resources/metadata/clientDefs/NewApplicant.json and added:
    Code:
    "dynamicHandler": "custom:newapplicant-dynamic-handler",
    2) I created client/custom/src/newapplicant/newapplicant-dynamic-handler.js and added:
    Code:
    define('custom:newapplicant-dynamic-handler', ['dynamic-handler'], function (Dep) {
    
       return Dep.extend({
    
          init: function() {
    
            // execute method controlFields
            this.controlFields();
    
        },
    
       });
    });
    Is this how I should do it? If so what code should I add to proceed?
Working...
X