How to Hide a Button from the form based on time interval

Abdul333
Tera Contributor

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

 

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Abdul333 

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Abdul333
Tera Contributor

@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

@Abdul333 

yes you can use sys_audit but query on that table will have performance impact as it's huge table.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@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