Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Need to Update Old Records using Fix Script

Priyanka1997
Tera Contributor

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.

1 ACCEPTED SOLUTION

Raghav Sharma24
Giga Patron

 

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();
}

 

View solution in original post

2 REPLIES 2

Raghav Sharma24
Giga Patron

 

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();
}

 

Thanks @Raghav Sharma24 for your prompt reply, Its perfectly working for me.