Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Is it possible to have a condition in Service Level Agreement screen use a date type field, instead of hardcoded date after the comparison

Posted on by 90

Hello,

Im trying to use SLA, and based off some conditions, i.e. work order has been "closed-posted" but within a selected quarter.

I created a calculated field that has today's date, which should be "on or before" the selected "quarter", the issue im having is that im only allowed to pass a date and now field of type "date"

please see screenshot below, is there a workaround? Or I'm missing something?

Thanks for any help!

pastedimage1593097183652v2.png

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Is it possible to have a condition in Service Level Agreement screen use a date type field, instead of hardcoded date after the comparison

    Hi partner,

    Has the problem been solved?

    Please click Yes under "Did this answer your question?" to close this thread.

    pastedimage1593510269192v1.png

    Thanks.  ;)

  • Suggested answer
    Linn Zaw Win Profile Picture
    Linn Zaw Win 3,405 on at
    RE: Is it possible to have a condition in Service Level Agreement screen use a date type field, instead of hardcoded date after the comparison

    As LuHao mentioned, the failure condition can only be the duration based on the "Applicable From" field in SLA.

    But if you want to make all the SLA of the records to be expired at the quarter's end date, there is a workaround solution.

    1. Create a new date field in the Work Order
    2. Create a flow to set the custom date field with x days before the current quarter's end date. (e.g. 14 days before the current quarter's end date 30 Jun 2020 would be 16 Jun 2020)
    3. Create the Work Order SLA with "Applicable From" field to the custom date field from step 1.
    4. Set the SLA Item "Failure after" to x days from step 2 (e.g. 14 days)

    Then, the SLA for all Work Order records created between 1 Apr 2020 to 30 Jun 2020 will be failed on 30 Jun 2020. You can tweak the flow in step 2 to get the desired outcome.

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Is it possible to have a condition in Service Level Agreement screen use a date type field, instead of hardcoded date after the comparison

    Hi Ainsley,

    Unfortunately, the failure condition can only be a fixed time.

    pastedimage1593421742991v1.png

  • Ainsley Profile Picture
    Ainsley 90 on at
    RE: Is it possible to have a condition in Service Level Agreement screen use a date type field, instead of hardcoded date after the comparison

    Thanks! my only other issue would be the failure condition. Which would have to be dynamic, as it would have to be today's date minus the quarter's end date which equal the remaining validate days to complete the task, is it possible to have dynamic values in the failure condition?

  • Verified answer
    LuHao Profile Picture
    LuHao 40,872 on at
    RE: Is it possible to have a condition in Service Level Agreement screen use a date type field, instead of hardcoded date after the comparison

    Hi Ainsley,

    Unfortunately, it is impossible

    But We can fulfill your needs in other ways.

    To compare two dates, we can new a calculated field to represent the difference between "quarter" and today's date. Then use this calculated field in the SLA.

    First refer to these blogs to know calculated field.

    https://www.powerobjects.com/blog/2018/02/12/how-to-calculate-number-of-days-between-two-date-and-time-fields/

    New a field, and select Whole Number and Calculated. Edit the calculated logic as follow.

    pastedimage1593151910293v1.png

    pastedimage1593152085931v2.png        pastedimage1593152118699v3.png

    If the value of this calculated field is greater than 0, then the date of "quarter" is greater than today.

    So set the SLA item condition to the calculated field is Less Than or Equal To 0.

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans