onStart Transform script to validate if the incoming file is empty or not#1943
Closed
sivamuruganandam-coder wants to merge 42 commits intoServiceNowDevProgram:mainfrom
Closed
onStart Transform script to validate if the incoming file is empty or not#1943sivamuruganandam-coder wants to merge 42 commits intoServiceNowDevProgram:mainfrom
sivamuruganandam-coder wants to merge 42 commits intoServiceNowDevProgram:mainfrom
Conversation
…nces in Published KB Articles
…nces in Published KB Articles
…llment Group References in Published KB Articles directory
…g user defined schedules directory
Contributor
|
Thank you for your contribution. Simple, jet useful script! However, the description of the PR does not match the script and readme fully. In the description you mention this solution (after detecting an empty import set) creates a ticket to be picked up. It would be great if you can add (an example) task creation in the code. Alternatively, adjust the description and clearly state that this is not included. In the code you can still add comment as placeholder where you think others should add it. This will help in better understanding and reviewing your contribution effectively. Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description:
Example use Case
Vendor data is periodically imported into ServiceNow via a scheduled data load (import set) sourced from an external application. These files contain only valid vendor records. After the import, any existing vendor records in ServiceNow that are not present in the latest file should be marked as inactive.
Risk
If the incoming file is empty due to an issue in the source application, all existing vendor records in ServiceNow could be incorrectly marked as inactive, resulting in data loss or disruption.
Solution:
To prevent this, implement an "onStart" transform script that checks whether the import set contains any data before proceeding with the transformation. If it is found to be empty, the script should:
This ensures that the existing vendor data in ServiceNow remains unchanged until the issue is resolved.
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions