We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Updating user details on change on catalog item

dannyprime
Tera Guru

I have some fields that I use in a variable set that is meant to show some user details when a users name is selected:

eg - Add a users name "Joe Dirt" and 3 other fields update automatically to show the users logon ID, email address and department for example. Change the name that is in there already and the new users details update in the 3 other fields.

 

Now I am well aware of the "auto-populate" option in a variable and have tried it. It works for me, but here is the catch, it is not working for a standard user, only for those with a role such as ITIL or Business Stakeholder

 

So when Jane wants to log a request for Joe to get access to something and the resolver team requires that Joe's email, logon ID and Department are filled in, it will not populate for her.

 

Anyone know how I can fix this?

2 ACCEPTED SOLUTIONS

Tanushree Maiti
Giga Sage

Hi dannyprime

 

It seems for your standard user ( example they have snc_internal role), they dont have read access on sys_user table.

I will recommend you for that for standard user's role , you can create field level Read ACL , so that they can see specific field of User table only.

Note:  It should be managed carefully via ACLs to avoid exposing sensitive data to all employees.

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

View solution in original post

Aditya_hublikar
Mega Sage

Hello @dannyprime 

 

Hello @dannyprime ,

 

As mentioned by @Tanushree Maiti standard users have some restriction that enforce by acl on sys_user table .Thats why email,departments are not readable/visible to standard users .

you can resolve this issue by creating  field level acls for email,department fields which will give you read access otherwise by using glideajax you can fetch relevant data and set that in your variables but it seems long process .

 

If this helps you then mark it as helpful and accept as solution.

Regards,

Aditya,

technical Consultant

View solution in original post

11 REPLIES 11

I don't think I need to justify our requirements for those fields however they are also needed for more than just our back end staff and also we actually like to put certain information so it is visible and to find it there doesn't need to be extra clicks. 

 

I would prefer if you have an idea as to why it isn't working that you assist, not try to tell me why what I asked is dumb. 

@dannyprime 

I believe I suggested what's recommended from customization point of view and keeping the instance with less technical debt.

In case you wish to use that then 2 approaches

1) create new table level READ ACL and allow read for standard user (I don't know what role they have)

OR

2) use onChange catalog client script + GlideAjax and then populate

GlideAjax Example Cheat Sheet (UPDATED) 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader