Set custom Workflow to run daily in CRM 2013

孤者浪人 提交于 2019-12-08 08:42:57

问题


I have written a custom work flow which is registered on account entity . I want this workflow to run daily to create tasks. the workflow works fine when i register it on record created . but it does not trigger when i schedule it for every day. like after 24 hours it should trigger automatically by itself

any one can help plz


回答1:


Two workflows:

  • Parent who runs on creation and triggers child.
  • Recursive child who triggers the custom workflow activity.


Parent workflow definition.



Child workflow definition. Extra validation step added to stop scheduled process on condition. Needs to be updated to your needs, of course. Status can be set to Cancelled for clarity.

Notice that the timeout is after the initial execution. This is by design to allow the custom activity workflow to run as soon as the child workflow is triggered by the parent workflow.





回答2:


As an alternate answer to what @denious is offering, you can use the CRM Workflow Automation Tool. It works on both CRM 2011 and 2013.

This works different in the sense that it does not use Workflow timeouts to accomplish a daily run, rather you set it up as a Windows Scheduled Task (likely on your CRM server) and have it run everyday at a set time.

Setup is minimal and the tool allows you to specify a FetchXML query to retrieve the appropriate records and then a Workflow to execute against the returned records.

A few nice things about this approach:

  • You can schedule all the tasks to run at the same time (for example 6 AM daily) as opposed to it being run based on whatever time the workflow was originally initiated.
  • Once the workflow is run there are no lingering workflow instances just running a timeout.
  • No need for a parent/child workflow setup. You just need a single workflow which does the respective action.
  • Because it runs on the Windows Task Scheduler you can do things like omit running on weekends where you cannot do this on CRM (without additional tools/rules).

Ultimately, both will accomplish the same thing but this is just another option to consider.




回答3:


Solved it after spending a week in it...
you should first start it manually by going in a record of the primary entity on which you have added your custom workflow

follow the steps below.

1) Register required steps
2) select record of the entity
3) click on the three ellipses button shown on the ribbon of CRM.
4) click on run workflow

Example
let' say my primary entity is account on which my workflow runs.

1)go to account entity
2)select a record
3)click on the three ellipses button on shown above on ribbon for every selected record
4)click run workflow
5)done



来源:https://stackoverflow.com/questions/27448801/set-custom-workflow-to-run-daily-in-crm-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!