- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2018 07:13 AM
Hello,
I am moving a scoped application from one instance to another. I have a lot of errors in the update set. I want to skip all of them at once. There are around 213,240 errors. I am planning to use fix script for that. This is the script I am using and not working. I am sure that's not the right way to set the value of URL field "available_actions".
var gr = new GlideRecord("sys_update_preview_problem");
var qry = 'remote_update_set=7ceb91e9db40ef804718b0f0ef96190c^status=^description=Could not find a table ***** this update requires';
gr.addEncodedQuery(qry);
gr.query();
while (gr.next()) {
gr.available_actions = 'Skip remote update';
gr.update();
}
Any help would be appreciated! 🙂
Thanks in Advance!
Su
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2018 08:07 AM
Use the while loop
var gr = new GlideRecord("sys_update_preview_problem");
var qry = 'remote_update_set=7ceb91e9db40ef804718b0f0ef96190c^status=^description=Could not find a table ***** this update requires';
gr.addEncodedQuery(qry);
gr.query();
gs.print("Row Count is: " + gr.getRowCount());
while(gr.next()) {
//You can put gs.action as the action parameter.
var ppa = new GlidePreviewProblemAction(gs.action, gr);
ppa.skipUpdate();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2018 08:04 AM
Use while loop instead of if
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2018 08:07 AM
Use the while loop
var gr = new GlideRecord("sys_update_preview_problem");
var qry = 'remote_update_set=7ceb91e9db40ef804718b0f0ef96190c^status=^description=Could not find a table ***** this update requires';
gr.addEncodedQuery(qry);
gr.query();
gs.print("Row Count is: " + gr.getRowCount());
while(gr.next()) {
//You can put gs.action as the action parameter.
var ppa = new GlidePreviewProblemAction(gs.action, gr);
ppa.skipUpdate();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2018 08:08 AM
Nice!
It worked. Thank you all.
Thanks a lot! 🙂
Su