Need to make a field visible only to a particular group after catalog item submission.

redth
Giga Expert

I need to make some fields visible only to a particular group after catalog item submission. Those fields will be displayed to all on the catalog item view. But, it should be visible to only one specific group after submission (at RITM level).

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Thank you Akshitha for the update.


Let me know if that answered your question. If so, please mark it as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. Thank you




P.S. Some users do not see the Correct Answer link (per this video at 20:00 https://community.servicenow.com/thread/224893). Let me know if you do not see it and I can get a community moderation to assist.


View solution in original post

5 REPLIES 5

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Akshitha,



You can create a client script to show/hide the variables based on the group check i.e gs.getUser().isMemberOf( ­'Capacity Mgmt'); //Pass group name as parameter


The above method only works at server side and returns true or false.



In your case you have to write a client script which will GlideAjax to get the above output. Please refer below link and let me know if you are blocked.



Reference :


GlideAjax - ServiceNow Wiki


Creating a Catalog Client Script - ServiceNow Wiki


Client Script Best Practices - ServiceNow Wiki


Getting a User Object - ServiceNow Wiki


Thanks Pradeep. It's working


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Thank you Akshitha for the update.


Let me know if that answered your question. If so, please mark it as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. Thank you




P.S. Some users do not see the Correct Answer link (per this video at 20:00 https://community.servicenow.com/thread/224893). Let me know if you do not see it and I can get a community moderation to assist.


Hi Pradeep,

 

    Can you re-share this link. I wasn't able to access it.

https://community.servicenow.com/thread/224893

 

Thank you.