logo

NJP

103. GlideMultipleUpdate

Import · Jun 09, 2024 · article

While scrolling the community to get an answer to my requirement, I found something useful worth sharing.

Have you ever heard of GlideMultipleUpdate?

When you absolutely, positively have to change every record in the table, accept no substitutes.

var mu = new GlideMultipleUpdate(table_name);

mu.addQuery(‘field_name’, value);

mu.setValue(‘field_name’, value);

mu.execute();

This will update all records that follow the query set. It is very fast, does not touch any system fields (sys_updated_on, sys_updated_by, etc.), and does not run any business rules, so its usefulness is limited to just that. If you have to update 600k records, and you do not care that the system fields are not updated, use this.

View original source

https://medium.com/@LearnITbyPrashant/103-glidemultipleupdate-f8af707c0e71?source=rss-d005fc598f0a------2