Custom Service Catalog Item Request Method
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 01:15 PM
Hello All,
I'm currently working to convert our SP to Employee Center, and as part of that process would like to convert the Request Method on our Catalog Items from the standard 'Submit' to a customized version that would allow our Help Desk to submit items on behalf of other users. Basically the 'Request' Request Method option, but locked to only certain users. If they weren't a part of the Help Desk, it would present like the 'Submit' option that we currently have, where they can request items solely for themselves.
Currently we use variables within each form to designate the 'Requested for', but this isn't very modular and means that we have to declare those on every form individually which can be tedious.
Has anyone done anything like this before, or does anyone have an alternative that would provide the same capability? I searched the forums but could not find a similar question.
Pictures attached: a form with the standard 'Submit' option that will route without prompting for the 'Request For' dialogue box, and a picture of the desired dialog box that is part of the Request option. Combining these two and displaying them based upon a Help Desk role is the primary goal.
Thank you for the help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2022 02:15 PM
Hello Ryan,
I would propose is making the field ReadOnly if the user is not part of the HelpDesk.
In the below link the documentation explains how to add a field, but in this case you would need to update the already existing logic.
https://docs.servicenow.com/bundle/sandiego-application-development/page/script/useful-scripts/task/t_AddFldSrvcCatCkout.html
Hope this helps!
Tudor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2022 01:12 PM
Thank you Tudor, that set us on the right track but did not get me all the way there.
In searching through that I did find this useful function cartJS.canViewRF()
Right now it seems that every role in our org makes that function true, but if I can configure which roles this considers then I will have accomplished what I'm trying to do. I haven't been able to determine where to edit this however.
Anyone know where to find this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 12:03 AM
glide.sc.req_for.roles
List of roles (comma-separated) that can update the "Requested for" widget in the service catalog. Blank means all users.
If the user does not have privilege to change requested for, they will not have ability to get other user address details
glide.sc.req_for.roles.default
This property defines a default behavior when there are no roles given in property "glide.sc.req_for.roles". When the value is "allow" and the value of glide.sc.req_for.roles is empty, then any user can request items for other users. While the value is "deny" and the value of glide.sc.req_for.roles is empty then no user can request items for other users.