How to link Servicenow Catalog UI policy with Catalog UI Policy Action using Table API?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago - last edited a week ago
I have a requirement to create Catalog UI Policies using Table API. I am able to create the Catalog UI Policy and Action using catalog_ui_policy and catalog_ui_policy_action table, but the action is not getting linked with the UI Policy. How can it be achieved using Table APIs?
These are API calls are being made
POST https://dev.service-now.com/api/now/table/catalog_ui_policy
{
"applies_to": "set",
"variable_set": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", //Variable Set SysId
"short_description": "Testing Table API",
"catalog_conditions": "IO:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=hide^EQ", //SysId of Variable in condition
"sys_name": "Hide Name"
}POST https://dev.service-now.com/api/now/table/catalog_ui_policy_action
{
"variable_set": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", //sysId of variable Set
"catalog_variable": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", //sysId of Variable
"visible": "false",
"ui_policy": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", //sysId of UI Policy
"variable": "name"
}
The first API call is working as expected, it is creating the Catalog UI Policy and adding the condition also.
The Catalog UI Policy Action is getting created after the second call but it not getting linked to the UI policy and not selecting the variable also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @iwsservicen,
Can you please share your JSON payload you are passing in Request Body of your Table API? Share payloads for both catalog_ui_policy and catalog_ui_policy_action tables. Because maybe you're passing some wrong properties so if you share that it'd be easy to identify your problem.
If my response helped, please mark it as the accepted solution and helpful so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago - last edited Thursday
Hi @Community Alums
Thanks for the reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Hi @Community Alums , I have updated the question with JSON payload and output screenshots
