- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 12:55 PM - edited 12-11-2024 01:00 PM
Hello Community!
I'm using the API /api/sn_sc/servicecatalog/items/{sys_id}/order_now to create a request and its ritm from a 3rd party tool.
I used the following body
Usually the requested_for had to be filled with sys_id but turns out that with user ID it works fine as well.
My issue is that I can do the above in a PD instance but not in my customer instance. Here it works accepting only a sys_id value in sysparm_requested_for, not a user ID.
Does anyone know how that works? Is there a business rule doing the job? Is it a script include?
Thanks!
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 06:54 AM - edited 12-16-2024 01:09 AM
Hello Danny!
I didn't try your suggestion but I found this article regarding the API I referenced before:
POST /sn_sc/servicecatalog/items/{sys_id}/order_now - Service Catalog API
It talks about 2 sys properties that solved the problem.
sysparm_requested_for
Sys_id of the user for whom to order the specified item. Located in the User [sys_user] table.
The settings of the glide.sc.req_for.roles and glide.sc.req_for.roles.default properties determine the level at which a user can request items.
If a value is specified in the glide.sc.req_for.roles property, the system checks if the user has the specified role to request information of other users.
If the glide.sc.req_for.roles property value is empty and the glide.sc.req_for.roles.default property value is deny, no user can request items for other users.
If the glide.sc.req_for.roles property value is empty and the glide.sc.req_for.roles.default property value is allow, any user can request items for other users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 10:04 PM
Hello,
If you want to use a user ID, maybe you can try adding this sysparm_input_display_value = true to the parameter:
/api/sn_sc/servicecatalog/items/{sys_id}/order_now?sysparm_input_display_value=true
I must fill with the sys_id in my PD instance, but when I add this parameter, user ID works fine.
Best Regards,
Danny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 06:54 AM - edited 12-16-2024 01:09 AM
Hello Danny!
I didn't try your suggestion but I found this article regarding the API I referenced before:
POST /sn_sc/servicecatalog/items/{sys_id}/order_now - Service Catalog API
It talks about 2 sys properties that solved the problem.
sysparm_requested_for
Sys_id of the user for whom to order the specified item. Located in the User [sys_user] table.
The settings of the glide.sc.req_for.roles and glide.sc.req_for.roles.default properties determine the level at which a user can request items.
If a value is specified in the glide.sc.req_for.roles property, the system checks if the user has the specified role to request information of other users.
If the glide.sc.req_for.roles property value is empty and the glide.sc.req_for.roles.default property value is deny, no user can request items for other users.
If the glide.sc.req_for.roles property value is empty and the glide.sc.req_for.roles.default property value is allow, any user can request items for other users.