Is there any difference between background script and fix script when we fix some old record?

Priyanka28
Giga Contributor

I need to change the assignment group of some old change request when i asked people for guidance some people told  me by using background and some people suggest me fix script and totally confused which one to use that's why i just wanted to know which one is better or it depends on the condition?

1 ACCEPTED SOLUTION

Hi Priyanka,

 

No fix script also have rollback option.But by default it is disabled.We have to enable it.

 

Let me tell you a scenario:

From last 2 days I am running a fix script in the background because I have to delete 5 lakh record.

 

Why I choose fix script over background?

Because first of all it runs in the background & second no one has the message for transaction waiting as well.

 

But when i have to check whether my script behaves well or not i ran it in background script for 10 records where I get complete info that which other tables are getting affected with respective operation as well updated/deleted/inserted.

 

Tip: Whenever you run any script,make sure to use:

gr.setWorkflow(false);//avoid triggering of BR
gr.autoSysFields(false);//avoid sys_upated_by field to show your UserId

 

Hope it helps.Mark it correct/helpful & close this thread.

 

Thanks

Sudhanshu

View solution in original post

9 REPLIES 9

Sajilal
Mega Sage

Please check if this helps, good practise to go with Fix script while running in Production Instance. In the past when we didnt have Fix script the ideal practise was to run in Background scripts/scheduled Jobs.

https://community.servicenow.com/community?id=community_question&sys_id=3e427075dbeb5344200f0b55ca96...

Please Mark as Correct if this solves your issue and also mark 👍 Helpful if it helps resolve your problem.

Thanks,
Saji

Thanks Sajilal

Sudhanshu Talw1
Tera Guru

Hi Priyanka

In terms of functionality both  are same. Purpose wise same.

Background script gives you the ability to rollback transaction, that's why people recommend this to use for bulk data uploading.

Suppose in case if the query ran wrong you have option to rollback the transaction.

For more info:

https://community.servicenow.com/community?id=community_question&sys_id=3e427075dbeb5344200f0b55ca96...

Thanks

Sudhanshu

Hi Sudhanshu,

Did you mean that fix script doesn't have rollback option?