web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How set due date to next working day?

(0) ShareShare
ReportReport
Posted on by 120

Hi All,

I have a business requirement to set the due date of activities to 8:00AM the next working day. 

Is there an out of the box way to achieve this using workflows? I know I can set the due date to Process Execution Time +/- (variable) but this won't account for weekends.

Don't really want to hack in plugins or javascript unless it can't be avoided.

Thanks

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at
    RE: How set due date to next working day?

    Not sure if you can do it without script or plugins.

    In JavaScript you can check if today is Friday, and if so, set the next Day to three days ahead, otherwise set it to next day.

    var today = new Date();

    if (today.getDay() == 5) // Friday = 5

    {

      nextDate.setDate(today + 3);

    }

    else

    {

         nextDate.setDate(today + 1);

    }

    nextDate.setHours(8);

    nextDate.setMinutes(0);

  • Suggested answer
    Ryan Maclean Profile Picture
    3,070 on at
    RE: How set due date to next working day?

    Hi David,

    OOTB I  don't think this is possible, somewhat frustratingly.  However, you could use the CRM DateTime Workflow Utilities that Jason Lattimer made to set this via a workflow - see https://github.com/jlattimer/CRM-DateTime-Workflow-Utilities/releases

    I've used this solution to do a really similar activity, and it worked perfectly for me.

    Cheers,

    Ryan

  • Suggested answer
    prt33k Profile Picture
    6,907 on at
    RE: How set due date to next working day?

    Hi David,

    The requirement ,I think, wont just be to omit weekend but also the public holidays.

    I dont think we can do this OOB - you have to write a custom workflow for it.

    A custom workflow can basically return the next working date and you can set the due date accordingly.

    Thanks,

    Prateek

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at
    RE: How set due date to next working day?

    If you are considering public holidays, you might need to use webapi and query the business closures entity (if configured of course).

    In looking at Jason Lattimer's DateTime workflow utilities, I think this will be the easiest way to solve your issue without any code involved.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans