Field should be editable for change manager only

anilkumarsharma
Giga Guru

HI Team,

Requirement : I have created one filed Implemneted without approval     on change form . this Fied Should be editable only for change manager when change status is Complete.


Point-1: I have made the filed read only from dictionary

Point 2 : I have written the UI policy which is mention bellow but it is not working

Condition:   Status   is Completed

Execute if True :

function onCondition() {

if (g_user.hasRole('change_manager'))  

          {  

          g_form.setReadonly('u_implemneted_without_approval',false);  

    }  

}  

Execute if False:

function onCondition() {

g_form.setReadonly('u_implemneted_without_approval',true);  

}

Pls. help

7 REPLIES 7

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Anil,



I would recommend to do with an ACL approach. However in your case you have to turn of the readonly checkbox for the field from the dictionary and then control with UI policy to make it work.


HI Pradeep Sir,


Good Morning,




how can i debug the Business rule , client script, UI Policy, ACL on Problem/change/IM table? Pls. guide .




if i go to Remedy i can debug active link and Filter at same time. is it possible in Snow?




Regards,Anil


8800144266


Hi Anil, give it a try typing Enable All in your navigation window.



Thanks,


Berny


Hi Anil,



Please go through the below link for more info.


http://wiki.servicenow.com/index.php?title=Debugging_Tools_Best_Practices#gsc.tab=0



Please let me know if you have any questions.