How to create new RITM from existing RITM closure

Navnit1
Tera Expert

Hi Team,

 

We have a requirement --

User create the RITM (First RITM)- with 3 Tasks.

              -->10  variables (out of 10 , only 8 variable values user could fill by the user and other 2 will be available in the system once this First RITM get closed ) 

 

Requirement is that once the last task of the First RITM get closed , then there will a trigger to create new RITM (2nd RITM) with the same 10 variables from First RITM.

 

Is it possible and how if yes? any lead will be appreciated.

 

Please help 

 

 

1 ACCEPTED SOLUTION

Hi Saurabh ,

 

Thank you for your inputs.

 

It looks like that it will work.

 

Thank you again

View solution in original post

3 REPLIES 3

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
Yes this is possible.
If you are using flow designer, you can use OOTB action, Submit Catalog Item Requests.
Alternative you can use cart API for the same.
Sample code.


 var cartId = GlideGuid.generate(null);
var catalogItemID ="sys_id of the catalog item to be raised";
var cart = new Cart(cartId);
var item = cart.addItem(catalogItemID);
cart.setVariable(item, "requestedby",gs.getUserID());
cart.setVariable(item, "requestedfor",gs.getUserID());
cart.setVariable(item, "titleoftherequest", 'Sample Code'); 
cart.setVariable(item, "v_description", 'Sample Code');
cart.placeOrder();





Thanks and Regards,

Saurabh Gupta

Hi Saurabh ,

 

Thank you for your inputs.

 

It looks like that it will work.

 

Thank you again

Hi @Navnit1 

Glad to hear it works for you.



Thanks and Regards,

Saurabh Gupta