Is it possible to abort the creation of a Catalog Request (sc_request) when no Requested Items (sc_req_item) are created?

abrahams
Kilo Sage

ServiceNow creates a Request record (sc_request) even when no Requested Item (sc_req_item) is created.  We have a catalog item which if they answer the questions in a certain way, no requested item is needed therefore, we inform the user and abort the insert of the record.  Doing this does create a Request without any associated Requested Items.

Does anyone know of a good way to stop the insert of the sc_request record under these circumstances?

1 ACCEPTED SOLUTION

DrewW
Mega Sage
Mega Sage

So I would just create the requested item and just close it right away.  That way you have a record of what the user entered.  Another option would be to prevent them from ordering it in the first place.

Trying to prevent the Request from being inserted is not going to be easy and maybe impossible because you will need records for Requested Items that are created.  So if you do not want to do my first suggestions above just run a scheduled job that uses a related list query and delete all of the Requests each day that do not have any Requested Item attached.

 

View solution in original post

2 REPLIES 2

DrewW
Mega Sage
Mega Sage

So I would just create the requested item and just close it right away.  That way you have a record of what the user entered.  Another option would be to prevent them from ordering it in the first place.

Trying to prevent the Request from being inserted is not going to be easy and maybe impossible because you will need records for Requested Items that are created.  So if you do not want to do my first suggestions above just run a scheduled job that uses a related list query and delete all of the Requests each day that do not have any Requested Item attached.

 

I think your idea of creating the requested item and then closing it right away sounds like a great idea.  Thank you!