How to create System Job RRS feed

  • Question

  • I need to create a custom asynchronous function in MSCRM 4.0. This function must be called from some period of time. 

    How can I do this? 

    Wednesday, June 24, 2009 10:42 AM


All replies

  • Hi,

    In order to create an asynchronous code that will run after an event, create a custom workflow activity and use it in a newly created workflow. Information on how to create custom workflow activities that run asynchronously can be found here:

    - http://msdn.microsoft.com/en-us/library/cc151142.aspx - Custom Workflow Activities
    - http://msdn.microsoft.com/en-us/library/cc151146.aspx - Using custom workflow assemblies

    Also, refer to the samples in the SDK found here: http://msdn.microsoft.com/en-us/library/cc151229.aspx

    If you want to create code that will run periodically, consider creating a regular application (exe) that does what you want and then schedule it, using Windows Scheduled Tasks as described e.g. here: http://support.microsoft.com/default.aspx/kb/308569

    I hope that helps,
    Kuba Skalbania

    -- Kuba Skałbania, Netwise
    Wednesday, June 24, 2009 10:48 AM
  • Hi Kuba,

    thanks for your answer.

    How can I start my workflow when MS CRM Asynchronous Service starts? Is there any event in MS CRM which say that Asynchronous Service has been started?

    Wednesday, June 24, 2009 4:12 PM
  • Hi,

    Your workflow can start either upon an event in CRM or can be started manually by the users. The MS CRM Asynchronous Service is (or rather should be) working all the time on the CRM machine, so you should not care about starting it. If the services terminates, no workflows will be processed.

    Best regards,
    -- Kuba Skałbania, Netwise
    Wednesday, June 24, 2009 4:59 PM