Skip to content

Add code snippet to backup Critical Table Data #1581

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

wendy-ha18
Copy link
Contributor

Overview

This ServiceNow script automates backing up critical record data (such as task or incident records) to an external storage solution. It helps developers maintaining redundancy for sensitive information by copying specific record details to a backup API whenever a record is created or modified.

Folder structure

  • Business Rules/Backup Critical Table Data/backupCriticalTableData.js
  • Business Rules/Backup Critical Table Data/README.md

P/S: Similar with the PR #1580, I hope this script is suitable with Business Rules folder, otherwise please help to point me to appropriate folder for it.

Thanks a lot!!

@SapphicFire SapphicFire self-assigned this Oct 31, 2024
Copy link
Contributor

@SapphicFire SapphicFire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Comment on lines +4 to +6
sys_id: current.sys_id.toString(),
number: current.number.toString(),
short_description: current.short_description.toString()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In future, use getter methods (getValue('field') and getUniqueValue()) to avoid having to use this method

@SapphicFire SapphicFire merged commit 271b1d6 into ServiceNowDevProgram:main Oct 31, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants