disable rollback of records while deleting records using script.

JT07
Tera Expert

Hi All, 

 

I have an use case where I need to disable creation of "rollback record"  while deleting the records using script. Internally method used for deletion is deleteMultiple().

Can someone let me know the line of code to disable rollback while deletion.

 

PS: I understand , in background script/Fix script, we have default check box "record for rollback" but I couldn't find underline code for this.

I understand, this is not a good practice but need this for particular use case.

3 REPLIES 3

Bert_c1
Kilo Patron

Hi,

 

As you state, the obvious answer is to un-check 'Record for rollback?' in Scripts Background.  And we as users do not have access to platform code, that is proprietary.

hi,

 

Thanks for response, I couldn't use background script /fix script. The way my code works, certain number of scheduled jobs will actually have deleteMultiple() line code. hence I am hoping, if could add couple of line code there to disable the rollback.

Bert_c1
Kilo Patron

https://docs.servicenow.com/search?q=Rollback%20a%20delete%20job

 

The rollback feature is present to prevent data loss. Create a Support Case to determine your options.