How to update a target field without coalesce in transform map
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2022 09:25 AM
Hi
I want to update an active field in target table if business area is XYZ, I tried the code below but it is inserting a new record instead of updating existing record
var resGrp1 = new GlideRecord('restricted_groups');
resGrp1.addQuery('group_id', source.u_group_number);
resGrp1.addQuery('business_area', XYZ);
resGrp1.addQuery('active', false);
resGrp1.query();
if(resGrp1.next()){
resGrp1.active = true;
resGrp1.update();
can anyone help me on this, Thanks in advance.
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2022 04:22 AM
Hi @Dharma5
Can you show the Screenshot of your Transform Map and onAfter Transform Script you have written.
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023