web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Suggested answer
    Dynamics Objects 365 Profile Picture
    550 on at

    Microsoft Flows can be an option. https://flow.microsoft.com

    You can create a scheduled flow.

  • Martin Donnelly Profile Picture
    1,030 on at

    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?

  • Jay2014 Profile Picture
    on at

    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,

  • Suggested answer
    Dynamics Objects 365 Profile Picture
    550 on at

    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
    on at

    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
    Kokulan Profile Picture
    18,054 on at

    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

     

  • Martin Donnelly Profile Picture
    1,030 on at

    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.

  • Martin Donnelly Profile Picture
    1,030 on at

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

  • Verified answer
    Joseph McGregor Macdonald Profile Picture
    597 on at

    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

  • Suggested answer
    RaviKashyap Profile Picture
    55,410 Moderator on at

    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.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans