Apply Tag to Specific Record#28
Merged
niamccash merged 5 commits intoServiceNowDevProgram:mainfrom Oct 2, 2025
Merged
Conversation
|
✅ Valid PR for ActionPack Thank you for your contribution. This PR complies with the CONTRIBUTING.md. |
Updating README.md to resolve conflict
Resolving conflict
Contributor
|
Closes #7 |
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.
This Pull Request (PR) addresses an enhancement related to one of the issues in the Action Pack repository:
Issue: feat: Create an action to add a Tag to a record #7
#7
This PR includes an action which is created to resolve the above issue
In this action i am taking input for table, record and tag name and after taking input i am checking whether tag is present then i am adding tag to the provided record and if tag is not present then i am creating and adding the tag to the record
The functionality was tested using a background script, verifying both valid and invalid input scenarios.
Input:
var inputs = {};
inputs.table = 'incident';
var gr=new GlideRecord('incident');
if(gr.get('c0cf7954874023003c1c8467a7cb0b54')){
inputs.record = gr;
}
inputs.tag_name = 'wow';
var outputs = sn_fd.FlowAPI.executeActionQuick('Apply_Tag_to_Specific_Record', inputs);
gs.info(JSON.stringify(outputs));
Output:
{"error_message":"","dont_treat_as_error":true,"tag_created":"true","tag_sys_id":"97268792c3d036104e08bd43e40131cc","tag_success":"true","action_status":{"code":0,"message":"Success"}}