Delete Surveys (Approx. 300) created by mistake (Tokyo release)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2023 03:08 PM - edited ‎10-04-2023 07:55 AM
Hi,
We have over 300 Surveys that were created on 10/01/23 that we need to delete.
These were not sent to customers, so they have not been completed.
Thank you for any guidance!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2023 09:18 PM
Hi @Leon Els ,
your saying Surveys sent but not sent to custmers??? what does that mean surveys created but not sent to customers?
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 07:56 AM
Hi @Hemanth M1 - thanks for your question!
My apologies, below is what I meant to communicate. I also updated my post above.
We have over 300 Surveys that were created on 10/01/23 that we need to delete.
These were not sent to customers, so they have not been completed.
Thank you for any guidance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2023 10:35 PM
HI @Leon Els ,
I trust you are doing great.
"Understood. To delete the surveys sent on 10/01/23, you can utilize the ServiceNow table API or directly access the Survey table from the platform. Here's a script to help you delete these records:
var surveyRecord = new GlideRecord('survey_table_name'); // Replace 'survey_table_name' with the actual table name
surveyRecord.addQuery('sys_created_on', 'ON', '2023-10-01');
surveyRecord.query();
while (surveyRecord.next()) {
surveyRecord.deleteRecord();
}
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2023 08:20 AM
Thank you @Amit Gujarathi - will be testing this today and advise 🙂