Skip to content

Apply Tag to Specific Record#28

Merged
niamccash merged 5 commits intoServiceNowDevProgram:mainfrom
shivamvish160:final
Oct 2, 2025
Merged

Apply Tag to Specific Record#28
niamccash merged 5 commits intoServiceNowDevProgram:mainfrom
shivamvish160:final

Conversation

@shivamvish160
Copy link
Contributor

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"}}

@github-actions
Copy link

github-actions bot commented Oct 2, 2025

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@niamccash niamccash self-assigned this Oct 2, 2025
@niamccash niamccash merged commit a4bae7b into ServiceNowDevProgram:main Oct 2, 2025
@wiz0floyd
Copy link
Contributor

Closes #7

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.

3 participants