- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 05:12 PM
Solved! Go to Solution.
- Labels:
-
Architect

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2024 03:57 AM
Using a script for this rather than out-of-box functionality is not recommended. I would recommend you configure your SLAs as follows:
Table | Start condition | User-specified duration | Schedule |
incident | Priority = 1 | 1 hour | <your schedule> |
incident | Priority = 2 | 8 hours | <your schedule> |
incident | Priority = 3 | 1 day | <your schedule> |
incident | Priority = 4 | 2 days | <your schedule> |
Then, you should build a report on the out-of-box incident_sla table, which joins the incident table with the task_sla table and includes the "Breach time" field from the generated task_sla record, which is automatically populated with the due date you're looking for.
Benefits of this approach
- No custom code which must be tested after each upgrade
- No hard-coded sys-ids or durations - easy to reconfigure the timings of the SLAs
- No custom fields
- Additional SLAs can easily be added at a later date - the solution is far more scalable
Please mark as correct or helpful if this assisted you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 05:56 AM
Thank you, let me check what you have suggested and will update you if it is working as expected.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2024 10:52 PM
Hi @dmarpaka
It appears that your script works well from my side. Can you provide more details about the error?
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 05:53 AM
I am trying it as a POC for my org. Once it works will update you more about it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2024 04:03 AM
Hi @dmarpaka
I am not a coder, but cant we set the SLA end time in due date?
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************