Not able to capture data using GlideUpdateManager2() in flow designer (run by system user)

Srikanth Pologi
Kilo Explorer

When I use below code in Flow Designer or Script Include (trigger from flow designer) or Business Rule, not working as expected. Same piece of code working fine in background script or Script Include (trigger from background script). Do we have any alternative way to capture data in current update set in automated script

var um = new GlideUpdateManager2();
var tasks = new GlideRecord(<Custom Table>);
tasks.addEncodedQuery('sys_idIN'+<comma separated sysids>);
tasks.query();
while (tasks.next()) {
um.saveRecord(tasks);
}

 

Thanks in advance.

 

1 REPLY 1

Daniel Draes
ServiceNow Employee
ServiceNow Employee

What is your use case? I rather sounds like something you should be doing in a fix script and not in a flow.