Record producer not updated in requests

Edwin Ng
Tera Expert

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:

find_real_file.png

However, I cannot find the created request in the list.

My thoughts for this cause are as follow:

  1. Missing a flow to create a task in the task table?
  2. Missing a flow to trigger an approval request?
  3. 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.

3 REPLIES 3

ShubhamGarg
Kilo Sage

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

Community Alums
Not applicable

Hi @Edwin Ng ,

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

Community Alums
Not applicable

Hi @Edwin Ng ,

Glad to see my answer helped You. 
Kindly mark the applicable answer as Correct & Helpful both such that others can get help.

Thanks,
Sandeep