How to Hide a Button from the form based on time interval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 04:27 AM
Hello All,
I have requirement that need to create a Button called "Send Reminder" in Agent Workspace in Case table.
Button should not be visible for current assignment group members of the case and Button should be visible for only previously assigned groups members.
Once Previous group member Click "Send Reminder" notification should sent to current assignment group members.
After that button should be hidden for next 2hours.
Please suggest me how should we can develop this.
@Ankur Bawiskar @Community Alums @Chuck Tomasi
Thanks,
Abdul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:20 AM
you can add condition in UI action for hiding members of current assignment group
But are you storing somewhere the previous group in some custom field? If not then you need to get that information they only you will know which group was previous one.
Also it will be difficult to hide the button for next 2 hours since you need to have some information on record that user has clicked the button to send email; based on that you can show/hide
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 06:58 AM
@Ankur Bawiskar , not storing previous assignment groups in any custom field.
Can we get the previous groups from "sys_audit" table? Because we need to show the Button to previously assigned group members only.
If its is possible to take the sys_id from sys_audit, please let me know what is the procedure.
Thanks,
Abdul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 07:52 AM
yes you can use sys_audit but query on that table will have performance impact as it's huge table.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2023 07:56 AM
@Ankur Bawiskar , thanks for the update.
Could you please share the code how should we get the previous assignment group sys_id by using sys_audit table?.
Thanks,
Abdul