- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 01:05 AM
Hi Everyone,
In Incident table, I have to change old records and condition will be like, If 'Test Completion Date' is not empty, then the 'Status' should set to "Completed".
Kindly help me If anyone used any Fix Script for such issue.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 01:11 AM - edited 11-11-2022 01:11 AM
var inc = new GlideRecord('incident');
inc.addQuery('Test Completion Date' , '!=' , ''); // check the backend name of test completion date and modify accordingly
inc.query();
while(inc.next())
{
inc.status=3; // check the value of completed state and mofidy accordingly.
inc.update();
}
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 01:11 AM - edited 11-11-2022 01:11 AM
var inc = new GlideRecord('incident');
inc.addQuery('Test Completion Date' , '!=' , ''); // check the backend name of test completion date and modify accordingly
inc.query();
while(inc.next())
{
inc.status=3; // check the value of completed state and mofidy accordingly.
inc.update();
}
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 01:53 AM - edited 11-11-2022 01:54 AM
Thanks @RaghavSh for your prompt reply, Its perfectly working for me.