Restrict from updating field values

arohi
Kilo Expert

1.On an incident form if a check box(u_major_incident) is checked and user is not a member of a specific group(Major incident), restrict from updating urgency and impact field and a 'reopen' button(ui action) and popup a message' Attempts to adjust Impact, Urgency, Reopen on Incidents that are marked as Major Incident can only be done by the Major Incident Team'.

2. And an email should trigger to major incident group with the users name in cc who tried to update field values.

Any help would be appreciated.

Thanks in advance

1 ACCEPTED SOLUTION

You can try the same script in UI Action, I am not sure how priority change logic is added in your Reopen button



if(!gs.hasRole('major_incident_user')){


  gs.addInfoMessage("Attempts to adjust Impact, Urgency, Reopen on Incidents that are marked as Major Incident can only be done by the Major Incident Team");


  gs.eventQueue();


  current.setAbortAction(true);


}





Thanks


PS: Hit like, Helpful or Correct depending on the impact of the response


View solution in original post

11 REPLIES 11

find_real_file.png


find_real_file.png


Couple of observations



1) You can remove the hard-coded condition and use the filter as both are not required


2) current.setAbortAction should be the last line in your code



Since this is an onAfter business rule, the field updates has already happened as it executed after update. Please change it to on before BR.







Thanks


PS: Hit like, Helpful or Correct depending on the impact of the response


Yeah Alikutty, its working fine now. And email is also triggering. Thanks foe help. Just one more thing how can I check in case of ui action i.e. reopen button which is on banner.


What are you trying to check from the Reopen button? I din't understand the requirement.




Thanks


PS: Hit like, Helpful or Correct depending on the impact of the response


same as attempt to update impact and urgency, if user who is not part of major incident team tries to click 'reopen' button he should get same alert and same notification should trigger.