Documentation or information for sn_sc.CatItem('producerID').submitProducer(requestbody);

jacque3
Kilo Guru

Hello Everyone, 
I just want to know if anybody here knows where can I find the documentation of sn_sc.CatItem().submitProducer(). I can't seem to find it in the Service Portal documentation.

The scenario is we have one Record Producer (Scoped), this  record producer will  update existing record from our custom table but when we submit the form it will says that there's a new record created.

checked the function postCatalogFormRequest() {} from SC Cat Item widget and it's calling /api/sn_sc/v1/servicecatalog/items/{sys_id}/submit_producer API and this API contains  new sn_sc.CatItem().submitProducer(). I don't know where to check next since I can't find any documentation for this function.

Note: There are no script/s that inserts/creates new value.

1 ACCEPTED SOLUTION

Beth11
Giga Guru

Hi there.

Found this by complete accident, but I've had similar needs and wanted to make sure you were running this line in your record producer script as the last line:

current.setAbortAction(true);

This keeps the record producer from progressing with its default behavior. I also recommend...

 

producer.redirect = '<your url>';

//and-or

producer.portal_redirect = '<your url>';

...which will control the behavior after you've submitted the record. I don't know if this solves the problems you were facing or helps at all at this point. For what it's worth, the documentation on submitProducer is MIA for me as well.

View solution in original post

1 REPLY 1

Beth11
Giga Guru

Hi there.

Found this by complete accident, but I've had similar needs and wanted to make sure you were running this line in your record producer script as the last line:

current.setAbortAction(true);

This keeps the record producer from progressing with its default behavior. I also recommend...

 

producer.redirect = '<your url>';

//and-or

producer.portal_redirect = '<your url>';

...which will control the behavior after you've submitted the record. I don't know if this solves the problems you were facing or helps at all at this point. For what it's worth, the documentation on submitProducer is MIA for me as well.