Looking for "scenarios" when to use Background script vs Fix script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 01:44 AM
Looking for "scenarios" when to use Background script vs Fix script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 01:51 AM
Hello @Suggy ,
Please refer to the detailed description below, when to use Background script or Fix Script:
Background Script:
Ad-hoc data manipulation: When you need to quickly modify, update, or delete records as a one-off task. For example, if there's a need to bulk update certain records or correct data.
Testing or debugging: Running quick tests on code to verify logic or investigate data without needing to create a business rule or script include.
No need for version control: Background scripts are typically used when there's no need to track changes for future reference.
Temporary, quick fixes: When you need to apply a solution immediately and it's not worth creating a permanent solution.
Small-scale operations: Often for smaller data sets, or when you're the admin or developer troubleshooting something on a non-production instance.
Example: Fixing data inconsistencies or migrating data in small volumes directly from the Script Editor in ServiceNow.
Fix Script:
Managed, tracked updates: When changes need to be recorded and version-controlled (via Update Sets), especially for deployment to other environments (Dev to Prod).
Permanently correcting data: When you need a more structured solution for cleaning up or fixing data that can be deployed as part of a release.
Changes across environments: When changes need to be executed across multiple instances, like in a coordinated release.
Repeatable solutions: If there is a potential that the fix might need to be applied again or by other teams.
Post-upgrade fixes: Fix scripts are commonly used after a system upgrade or release to clean up or apply adjustments based on new configurations.
Example: Executing a fix that aligns with new requirements introduced in a release and needs to be tracked for compliance or audits.
Please mark it as "Helpful" and "Accepted", if this solution works for you!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2024 01:58 AM - edited 09-23-2024 02:02 AM
Hi @Suggy,
There a superb article covering this from @The SN Nerd (Kudos) which can be found here. Have a read, they've gone through the differences, pro's and con's, and scenarios in great detail:
As a quick snapshot (and covering future use an broken links etc) - again from the SN Nerds article, see this great diff at a glance, however please see the article link as above... it highlights and showcases what knowledge people in the community provide and give back.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie