Hi
I have some code (in a plugin) that I'd like to use to make regular housekeeping updates to my CRM.
I'm not sure a plugin is the best approach but the functionality needs to run at 15minute intervals.
Would it be better to use a Workflow?
*This post is locked for comments
you can use Azure Functions
This post will help you with the schedule: https://nishantrana.me/2017/04/29/using-azure-functions-for-writing-scheduled-jobs-for-dynamics-crm/
and this one to do a certificate based authentication: https://community.dynamics.com/crm/b/crminthefield/archive/2019/05/29/certificate-based-authentication-with-azure-functions-key-vault
Hi
Plugin is not used for running scheduled tasks in CRM.
You could use Workflow or Flow or combination of both to do this.
Workflow is good in executing logic in CRM but it does not have a clean scheduling mechanism. We can get around this but creating waiting workflows. Where as Flow as a built in schedule trigger.
So you could consider the following solution which executes a workflow
community.dynamics.com/.../executing-dynamics-365-workflows-from-microsoft-flow
I you would like to stick to CRM workflows, please refer to the links below
community.dynamics.com/.../scheduling-recurring-emails-using-a-workflow
gonzaloruizcrm.blogspot.com/.../quite-often-we-have-business-process.html
You may have to move your plugin code into a Custom Workflow Activity and call the in the workflow if the logic implemented using Workflow out of the box features.
Hi,
You can use a custom workflow assembly/action within workflow to achieve the same.
1. Create workflow to wait for X duration defined in the entity for the specified date i.e. Scheduled Date.
2. Create an action to perform the logic.
3. After every x duration, update the date to date+x duration.
4. Run the workflow on Scheduled Date update.
If found useful, please mark this answer as verified.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156