Populate "glide_list" field ( sys_user table ) with new values | Query
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 05:24 AM
Hi All,
I am trying to populate a "glide_list" field with the help of a "Fix Script" but somehow the values are not getting updated/populated.
//var cnt = 0;
var grGcrApp = new GlideRecord('<Table>');
grGcrApp.addEncodedQuery('<some_encoded_query>');
grGcrApp.query();
while (grGcrApp.next()) {
//cnt++;
//u_dmo_gcr_level2_approvers,u_dmo_gcr_level3_approvers,u_dmo_gcr_level4_approvers are glide_list fields taking
//value from sys_user table
grGcrApp.u_dmo_gcr_level2_approvers = '20a397badb8b138071957608f496193f'; //assign a new user
grGcrApp.u_dmo_gcr_level3_approvers = ''; //change to blank
grGcrApp.u_dmo_gcr_level4_approvers = ''; //change to blank
grGcrApp.setWorkflow(false);
grGcrApp.autoSysFields(false);
grGcrApp.update();
}
Any idea where I am getting wrong?
Regards,
Saurabh
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 06:00 AM
Are you getting into the 'while'?
Are you sure there are no typo's in the field names?
Are you trying to update some data in a scoped app that you don't have access to?
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark