How can I update the target table records by using MRVSet in record producer

msc
Tera Contributor

Hi @Ankur Bawiskar ,

How can I update the target table records by using multi row variable set in record producers. 

Let say for every record in MRVSet if matching record in Target table is found then I have to update it else new record will insert by using record producer.

Is it possible to do that , please help me on this.

 

5 REPLIES 5

Tony Chatfield1
Kilo Patron

Hi, in your producer script I think you would want to loop through the contents of the variable set, and for each row/group of variables looking up each related record using GlideRecord and update the record (assume this is from other variables in the row).

if you do not want to 'insert' a new record from the record producer at the end of your script you would need to abort the action using current.setAbortAction(true);

Mark Roethof
Tera Patron
Tera Patron

Are other people than Ankur also allowed to reply 😂
I'll just keep a good answer for your question in my pocket in the meanwhile.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

msc
Tera Contributor

Hi Mark, 

Please help me on this.

Ankur Bawiskar
Tera Patron
Tera Patron

@msc 

you can use flow designer or business rule on the target table of record producer.

what approach did you start with and where are you stuck? what debugging have you done so far?

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