Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Scheduled workflow

(0) ShareShare
ReportReport
Posted on by

Hi,

Scenario

- 15 records are created within the Fiscal year and assigned a start date, [15, in a year].

I would like to create a task before the start date of each record.

Whats the most efficient way of creating a scheduled job ? I don't want to use waiting work flows.

Thanks

*This post is locked for comments

  • Dynamics365 Rocker Profile Picture
    Dynamics365 Rocker 7,755 on at
    RE: Scheduled workflow

    You can use MS flows.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Scheduled workflow

    Hi,

    If you want to go for free tools then try as suggested above or you can try below solution which can be configured to run a workflow on a daily basis on a fetch xml records-

    alexanderdevelopment.net/.../updated-solution-for-scheduling-recurring-dynamics-crm-workflows

    Hope this helps.

  • Verified answer
    RE: Scheduled workflow

    Hi M

    I have a managed solution which I use for these types of scheduled/recurring workflows in dynamics. I find it works well because the configuration and components are all stored inside dynamics

    In the past I experienced some reliability issues with the asynch service unexpectedly failing the recurring workflow but recently with the monitoring and redundancy I implemented in the solution it has been running pretty reliably

    I have written an article about it here josephmcmac.wordpress.com/.../dynamics-365-workflow-scheduler

    You can download the managed solution here github.com/.../latest

    The code and customisations are all open source in github as well if you want to take a look

    Feel free to try out this option if you want

  • Martin Donnelly Profile Picture
    Martin Donnelly 1,016 on at
    RE: Scheduled workflow

    ...don't we all!  Unfortunately you get no access to the SQL agent nor its jobs.

  • Martin Donnelly Profile Picture
    Martin Donnelly 1,016 on at
    RE: Scheduled workflow

    Instead of a plugin, you could make a workflow listening for delete.  Nothing "Dev", but simple may not be available.  The only way to generate scheduled events out-of-the-box is workflow waits and bulk deletes.

    The Flow or Azure are your only alternative.

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,052 on at
    RE: Scheduled workflow

    Hi

    Workflow is really good at working with any records within CRM but it does not have a clean scheduler or job runner. We can still create a scheduled workflow but we will have to achieve this using a waiting workflow which you seem don't want to go for it. Waiting workflows have their own issues and i can see why you are hesitant to go for waiting ones.

    You could consider one of the following options

    Option 1: Taking advantage of the best of both worlds - Workflow and Flow

    What about if you create a workflow that does all you want for that particular record and then use a scheduled flow to run the workflow on these records.

    Please follow the link below to know how you can create a scheduled flow

    [View:https://docs.microsoft.com/en-us/flow/run-scheduled-tasks:750:50]

    And follow the link below to see how you can run a workflow from Flow

    [View:https://community.dynamics.com/crm/b/alexanderdevelopment/archive/2016/12/10/executing-dynamics-365-workflows-from-microsoft-flow:750:50]

    In your case, you could achieve what you want using the following steps

    01.  Create the Workflow in CRM as an On-Demand workflow (This does not have to trigger on record events but you can set to trigger if you want to cater for scenarios like when date changes or something along the line)

    02. Create a flow to trigger on a daily basis, or whatever the interval suitable for you

    03. In Flow, use the Dynamics 365 Connector - List action to get all the records you want to check if the start date is tomorrow. And for the record that has start date tomorrow, run the workflow in CRM and have all your logic in the workflow - creating task or sending an email and all that stuff.

    Option 2: Use only flow

    You can achieve the whole thing just using flow, please see the steps below

     

    01. Create the flow to trigger Daily or Weekly or whatever the interval suits you

    02. In the flow, use the List action of Dynamics 365 or CDS connector to retrieve all the records that you want to send a reminder for

    03. Loop through each record and check if the Start date is tomorrow - Using Apply Each

    04. Send an email or Create Task as a reminder

    05. Update the flag field or other fields on the record to mark that the reminder has been sent.

     

    Hope this helps

     

  • Jay2014 Profile Picture
    Jay2014 on at
    RE: Scheduled workflow

    That will not do it, it has limitations because of how i want the Work Orders created. 

    Same questions remains, I want to know the best way of triggering workflows to run against existing records without waiting workflows. 

    More like an SQL Agent job.

  • Suggested answer
    RE: Scheduled workflow

    I think you can configure all this to happen automatically.

    I assume that you will also be creating bookings for the work order. You can create a workflow to send the email when the workflow is booked (booking is created)

    Have a look at -Pre book a workflow section in this link -  docs.microsoft.com/.../set-up-customer-agreements

    Explore it and spread the joy.

    Cheers !!

  • Jay2014 Profile Picture
    Jay2014 on at
    RE: Scheduled workflow

    For background,

    I am creating Word Orders against an Agreement and spread them through out the year based on different condition .

    I want to send reminders and emails, 1 day before the start date of a Work Order.

    I would prefer to make the process simple and use free tools out there, than Dev it.

    Thanks,

  • Martin Donnelly Profile Picture
    Martin Donnelly 1,016 on at
    RE: Scheduled workflow

    You can't get there from here!  If you want to create a scheduler, you have to go to Azure.

    I'm going to assume you have a reason for not wanting tasks with future due dates.  Here's my best guess using the only scheduling function available -- bulk delete.  

    1) create 15 (or a decade's worth) of custom entity records which each hold enough information to create the task

    2) build a plugin that is listening for the delete of these records and creates the task from the contained info in the image

    3) set up a nightly bulk delete that deletes each of these schedule records as they "come due" nightly -- i.e. their own due date not the task due date

    ---you can build filters in the fetch attached to the bulk delete job

    All point-in-time.  No waiting.

    Question: what process is creating the 15 FY records?  You can't use that because you need more lead time?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans