How can I update the target table records by using MRVSet in record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 11:45 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:02 PM
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 as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 12:16 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 08:03 PM
Hi Mark,
Please help me on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2024 06:41 PM
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?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader