Catalog Builder - Record producer does not exist error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 04:27 AM
Hi ,
When the catalog item owner is trying to edit the catalog item in catalog builder, receiving the error "Record producer does not exists" error.
There was an "Before" - query business rule in Catalog Item table to list only the catalog item's where the logged in user is the owner of the catalog item. Below is the script.
(function executeRule(current, previous /*null when async*/) {
var isQueryFromCatalogBuilder = GlideTransaction
.get().getRequest()
.getHeader("referer").indexOf('/now/build/catalog') > -1;
if (isQueryFromCatalogBuilder == false)
{
return;
}
// Query is not coming from the Catalog Builder UI so filter items to owner only
if (gs.hasRole("admin") == false)
{
// Limit to current user if user is not an admin
current.addQuery("owner", gs.getUserID());
// Limit to items using step based fulfillment flow (which means Catalog Builder)
current.addQuery("flow_designer_flow", "21ea92dd53622010fca7ddeeff7b12b1");
}
})(current, previous);
Note : After deactivating this Business Rule, the error is not coming . But all the catalog item is available in the list.
Please help me to fix the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2024 04:31 AM
Is this item has been changed or checked out at native view?
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 05:40 AM
I figured out the solution to this issue. On the sc_cat_item table, you have different class of items, like catalog items, record producers, composite record producers. The query rule above limits the visibility to only those items where the owners are defined as per the query. The issue is that you this way also set the Composite Record Producer 'invisible' and you get the above message. I happened to bump into the solution, after the custom configured Service Fulfilment Steps were though appearing, but all without details.
My solution was to include those Composite Record Producers that are without a Catalog defined (sys_class_name=sc_cat_item_composite_producer or of course != considering how your business rule looks like now) and it solved the problem. If you need more details, let me know.
Please mark this solution helpful if it solves your problem.