Record producer not updated in requests
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 12:39 AM
Hi,
I have created a catalog item using record producer. This catalog item belongs to its own custom category in the service catalogs. When this item is submitted, it is recorded in a custom table which is extended from the task table (SNOW core table)
I have expected that when this item has been submitted, it will be accounted in "my requests" list which can be accessed from the request menu from the header menu as shown below:
However, I cannot find the created request in the list.
My thoughts for this cause are as follow:
- Missing a flow to create a task in the task table?
- Missing a flow to trigger an approval request?
- Need to add to the server script of the "my_request" widget to append the record from my custom table?
I would appreciate anyone help for my encounter and reference materials that you could share with me on the above.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 12:42 AM
Hello Edwin,
When we use record producer, by default it only creates a single record in the table we define during its definition.
Record producer is task based record.
Your record will use only the workflow defined in the target record (if any).
Refer doc - Record Producer (servicenow.com)
Let me know if issue persists.
Mark this as Correct/Helpful if it helps.
Regards,
Shubham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 12:42 AM
Hi
I have found the solution on another post!. If you add the below script to your record producer form, it will then add the requested item to the generated request. This in turn then updates the "My Request" widget.
insertChildren();
function insertChildren() {
var grReqItem = new GlideRecord('sc_req_item');
grReqItem.initialize();
grReqItem.request=current.sys_id;
grReqItem.cat_item='xxxxxxxxxxxxxxxx'; //insert sys_id of catalog item
grReqItem.insert();
}
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2022 12:02 AM
Hi
Glad to see my answer helped You.
Kindly mark the applicable answer as Correct & Helpful both such that others can get help.
Thanks,
Sandeep