disable rollback of records while deleting records using script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 06:39 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 08:00 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 08:16 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2023 09:29 AM - edited 06-06-2023 09:30 AM
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.