How to hide New and Edit button based on roles. Urgent!!!!!

madanm2103
Kilo Explorer

Hi All,

 

I need to hide New and Edit button for problem creator role in the Problem Task related list in Problem form.

I tried all the possible ways but still not working.

PLease help me on this.

 

Thanks,

Madan

22 REPLIES 22

marcguy
ServiceNow Employee
ServiceNow Employee

You can check state to: parent.state will work.


Where I can add this condition?



I am currently on fuji patch4. On list control, I don't have field of "Omit New Condition".



+ I have created this new thread for this query of mine.


How to hide New/Edit button on related list based on value of parent field. Urgent!!!



Regards,


vaibhav


Hello mguy,



My one instance is on fuji patch9. Where I have option of adding condition in "List Control".



New button is not visible when state is resolved or closed. Below condition worked on that.



if(parent.state == 6 || parent.state == 7){


  current.omit_new_button = true;


}



But, Still issue is not resolved for me.! 😞 Because, I have older patch on other instances.


Inactive_Use167
Mega Expert

Hi,



you can try this



Navigate to Problem> Problem task>Personalize>list control>Omit new button and add required roles from the slush bucket >update and verify it.


Hi Harish,



My issue is. I don't want to build condition based on Role. It's based on state of parent ticket.