HR Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-27-2025 03:38 AM
Hi @everyone,
need to create one button on the HR Agent workspace whenever click on the button it should come popup which will display number of attachment attached to a HR case.
please let me know if anyone have response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-27-2025 03:54 AM
Hello!
To create a button on the HR Agent workspace that shows a popup with the number of attachments for an HR case, add the button to the UI, write a script to handle the button click, fetch the attachments, and display the count in a popup. Modify the implementation to fit your specific platform and requirements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-27-2025 06:21 AM
If you are going to use AI to create answers for you, at least validate the usefulness of the answer before copy/pasting it. Or find one that gives proper answers. The 'Modify the implementation' part kind of gives the bad AI away. Especially since it says 'specific platform'. You didn't even put 'ServiceNow' in the prompt.
And if it's your own answer, you do realize that this absolutely doesn't help?
If someone tells you they haves never driven a car and asks how to get to the restaurant at the other side of town, it doesn't help to tell them to get into their car and drive to the restaurant.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-27-2025 05:41 AM
Hi @KritiK
You can use below approach
1)create UI action on your HR table. I have created ui action on incident table and used following code
2) Client callable script include call in ui actions and below code used in script include
In SI I have calculated no of attachment for particular record.
Please check this once and let me know if it helpful or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-27-2025 05:53 AM
What is your use case? Because on the HR Agent Workspace you have the possibility to just show all attachments on the sidebar. What is the business requirement of having a popup appear with the number of attachments?
If it really is an important parameter, why not just create a new field 'attachment_count' and put it in the header of the Case, so you always have the info. This explains how you can do that.
And if that isn't worth it, you could try utilizing this: https://support.servicenow.com/now?id=view_idea&sysparm_idea_id=94b9224097694a10f03d739c1253afff&sys... (found through this question: https://www.servicenow.com/community/developer-articles/verify-attachment-count-in-service-portal-or...)
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark