Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Clone case along with variables

Hafsa1
Mega Sage

I have a requirement to duplicate a customer service case along with all its variables in variable editor.

Suppose a case is created and when analyst make field Private(custom field)  as true, then a duplicate case should get created and assigned to SC-HR team with all values same as current record along with all it's variable. How to achieve it?

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Hafsa1 

you can use OOTB Cart API OR CatItem API and set all the variables again on fresh HR case

see these links

How to Submit record producer using script ServiceNow 

Submit the record producer from script 

CatItem - Scoped 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader