GlideMultipleUpdate with addQuery

Chris P_
Tera Expert

I'm trying to use GlideMultipleUpdate, but it behaves kinda weird...

Here's my code:

var grt = new GlideMultipleUpdate("u_grit_path_import");

grt.addQuery('u_groupname', 'BUILTIN\\Administrators');

//grt.addQuery('u_groupname', 'CONTAINS', 'BUILTIN');

//grt.addQuery('u_groupname', 'IN', 'BUILTIN\\Administrators');

//grt.addQuery('BUILTIN', 'IN', 'u_groupname');

grt.setValue("sys_import_state", 'ignore');

grt.execute();

I've tried with different options which are commented out in the above example, but I keep getting the error message:

*** ERROR *** com.glide.db.GlideSQLException:

See glide log for error details

With the following message in the log:

*** ERROR *** com.glide.db.GlideSQLException:

And when I don't get an error message, he just skips the where-clause and updates all records.

I'm at a loss, any ideas anyone?

1 ACCEPTED SOLUTION
22 REPLIES 22

Ah it actually says it right there in the Warning:


WARNING:


This does not work for inherited tables. For example if you inherit from task (incident, change) and try to use a field on task in your query clause, you will end up updating every record




Close the question if everything is set