Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Calculate SLA Duration excluding weekend and holidays

Posted on by Microsoft Employee

Hello everyone , 

I'm trying to calculate the duration for each SLA KPI instance in Dynamics 365 , 

 so we have the created on date and succeeded on date , and i can calculate the duration without excluding weekends and holidays

I already tried this solution , but i think it's calculating (Saturday and Sunday ) as weekends and it's giving 0 as a result most of times : 

https://community.dynamics.com/enterprise/b/razdynamics365/archive/2017/01/30/calculate-duration-of-business-days-in-dynamics-365-crm

Any ideas  ?

THANKS . 

*This post is locked for comments

  • JayadeepuDadi Profile Picture
    JayadeepuDadi 15 on at
    RE: Calculate SLA Duration excluding weekend and holidays

    Hi Bipin, could you please provide the link for this solution.

  • buena-dev Profile Picture
    buena-dev 10 on at
    RE: Calculate SLA Duration excluding weekend and holidays

    You're welcome! I just realized the link attached to my first reply doesn't work. Here's the complete link:

    buena-dev.com/.../crm-plug-in-that-calculates-sla-duration

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Calculate SLA Duration excluding weekend and holidays

    Hi,

    Thanks for sharing,

    If found helpful, Please mark my answer verified.

  • Suggested answer
    buena-dev Profile Picture
    buena-dev 10 on at
    RE: Calculate SLA Duration excluding weekend and holidays

    Hi, I know this question was posted three years, and just recently I had a similar challenge. After looking at the different entities involved, I wrote a plug-in that calculates the total number of hours and minutes spent against the SLA. The code I posted here can be a good start.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans