- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You have State model defined for your problem table
So it's not allowing you to move from State A to State B
You will have to update your state model so that you can achieve your requirement and update is allowed and it allows moving from your current State to On-Hold
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @surajchacherkar ,
I gave script for UI Action without Client checkbox checked.
For this one, you can use this code
function onPendinOnHold(){
g_form.setValue("state","105");
g_form.save();
}
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You have State model defined for your problem table
So it's not allowing you to move from State A to State B
You will have to update your state model so that you can achieve your requirement and update is allowed and it allows moving from your current State to On-Hold
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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.
Muhammad Iftikhar
If my response helped, please mark it as the accepted solution so others can benefit as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @palanikumar ,
I’ve created a UI action, but it’s not working as expected. When I click the bottom button, it opens a new Problem record correctly. However, the top button doesn’t respond at all—clicking it does nothing.
Could you please help me troubleshoot this issue or guide me on what might be missing?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
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
Palani
