- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 02:09 AM
Hi Team,
In ATF test step from the "Record Query" I can see the 12 records and I want to update the 12 records for that I have taken the Record update.it is updating the only one record instead of the 12 records. How we can update all records from the query.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 02:14 AM
Hi @Khalid9030
You cant update , bulk records in one go.
You may need to write Server side script.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 02:20 AM
Hi @Khalid9030
Assalamalaikum!.
Brother, Record Update only update the first record of the output of Record Query.
You need to run Record Update 11 more time (depending on the count of records in Record query).
the other way is, you can use Run Server Side script
Here is the sample:
javascript
var gr = new GlideRecord('incident');
gr.addQuery('assignment_group.name', 'Service Desk');
gr.query();
while(gr.next()) {
gr.assignment_group = 'new_assignment_group_sys_id'; // replace with the sys_id of the new assignment group gr.update(); }
Kindly mark helpful/Solution 🙂
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 02:14 AM
Hi @Khalid9030
You cant update , bulk records in one go.
You may need to write Server side script.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2024 02:20 AM
Hi @Khalid9030
Assalamalaikum!.
Brother, Record Update only update the first record of the output of Record Query.
You need to run Record Update 11 more time (depending on the count of records in Record query).
the other way is, you can use Run Server Side script
Here is the sample:
javascript
var gr = new GlideRecord('incident');
gr.addQuery('assignment_group.name', 'Service Desk');
gr.query();
while(gr.next()) {
gr.assignment_group = 'new_assignment_group_sys_id'; // replace with the sys_id of the new assignment group gr.update(); }
Kindly mark helpful/Solution 🙂
Regards
Shaqeel
***********************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful." This action benefits both the community and me.
***********************************************************************************************************************
Regards
Shaqeel