The CreatorCon Call for Content is officially open! Get started here.

How to add an "On-Hold" button in the Problem Ticket screen to pause SLA?

surajchacherkar
Mega Guru

Hi All,

 

we have a requirement to add a "Pending/On-Hold" button in the Problem Ticket screen. The purpose is to pause the SLA when the root cause analysis depends solely on a third-party vendor.

Additionally, this button should be visible only to the member of Incident Manager team.

Has anyone implemented something similar or can guide how to achieve this?

 

Thanks in advance!

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@surajchacherkar 

so it should be a UI action, you need to do this

1) ensure you add proper condition for visibility

gs.getUser().isMemberOf('Incident Manager')

2) Script

-> set the state to Pending and update

3) Ensure your add Pause condition in your SLA to pause it when State moves to Pending State

what did you start and where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

M Iftikhar
Giga Sage

Hi @surajchacherkar,

You can check out this detailed discussion on the ServiceNow Community - it covers a similar use case about pausing SLAs and might help you design your solution:
Solved: Pause in SLA - ServiceNow Community

In your case, to implement the "Pending/On-Hold" button with role-based visibility and SLA pausing logic, you'd typically do the following:

  • UI Action: Create a new UI Action (button) on the Problem form.
  • Condition: Set visibility based on role (e.g., gs.hasRole('incident_manager')).
  • Script: Add logic to set the Problem ticket to an On Hold state.
  • SLA Definition: Configure your SLA to pause when the state is set to On Hold.

Thanks & Regards,
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.

palanikumar
Giga Sage
Giga Sage

Hi

I dont think Problem has Onhold as out of box Choice. You need to first add this choice to the state field

Create a UI Action with script

     current.state = "3"; // Replace 3 with the actual value used in your choice

     current.update();

In SLA configuration you need to add pause condition with value as state = Onhold 

Thank you,
Palani