How to create a RITM without creating a REQ?

Anand Kumar7
Tera Contributor

Hi All,

We have a requirement to create "x" number of RITM based on the "x" number of rows used in "Multi row variable", this RITM in turn should not create multiple REQ.

We had a requirement to create a multi share windows catalog request i.e. in 1 request we will need to raise multiple share request, so we have used "Multi row variable"(MRV) with variables like "Share name and access required" based on the number of rows created in MRV we created the same number of RITM

But the issue which we see is for every RITM it is creating a REQ we need to avoid creating this REQ since this creates a confusion for the requester

Thanks.

2 REPLIES 2

Apeksha Joshi
Kilo Guru

hi there ,

please refer the following link :

https://community.servicenow.com/community?id=community_question&sys_id=f4d147a9db98dbc01dcaf3231f96...

If my reply helps you at all, I’d really appreciate it if you click the Helpful button and if my reply is the answer you were looking for, it would be awesome if you could click both the Helpful and Accepted Solution buttons! 

 

Regards,

Apeksha

AbhishekGardade
Giga Sage

Hello Anand,

1. As i can you are using  cart.placeOrder(); to place orders for each item. So dont use for creating a request for each MRVS record. remove it from loop

2. Then create a RITM for each MRVS record and  you can set same REQ number for each RITM Created. Check out the below code

var gr = new GlideRecord('sc_req_item'); 

gr.initialize();

gr.cat_item= 'pass sys Id of cat item';

gr.request = 'sysID of request created ';

gr.description = 'Value you want to set';

gr.variables.variable_name =  'Value you want to set';

gr.insert();

Reference : https://developer.servicenow.com/app.do#!/api_doc?v=london&id=r_GlideRecord-initialize

So in this way, only one request will be created and you will have created ritm under same REQ.  

Let me know if you need a complete script.

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

 

Thank you,
Abhishek Gardade