locked
SQL and CRM 4.0 integration RRS feed

  • Question

  • Hi,
    I need a way to schedule a task in SQL that would trigger a certain query or stored procedure that will call a crm 4.0 webservice and write on CRM data from SQL.
    How can i do that?
    Any helpful blogs?
    Thanks in advance
    Friday, February 27, 2009 1:32 PM

Answers

  • Actually I prefer a Console application if it's a scheduled thing. The you can also run it manually, easy, and print information to the display.
    A windows service will also do the job fine, mut it's more effort and complexity, and don't add much value in this kind of scenario. (personal opinion).

    You can find the "scheduled tasks" in the control panel on the server. It's quite intuitive hos to use it.

    Best regards
    Jens



    Monday, March 9, 2009 8:05 PM

All replies

  •  

    I would program a CLR-stored procedure in Visual Studio that retrieves the data and uses the CRM webservice to access crm.
    This procedure can be triggered from a job registred in the sql agent service on the SQL Service.
    It should be well documented on MSDN online and in SQL Server Books Online.

    Or

    Program a .NET assembly (console application) that does the job, triggered by the task scheduler in windows.

    Best regards

    Jens Egil Evensen

    • Proposed as answer by Ronald Liu Friday, February 27, 2009 5:05 PM
    Friday, February 27, 2009 4:10 PM
  •  Hi,
    Thanks for your reply.
    So i write a console application and schedule it from the Task Scheduler on the CRM server.
    Can you give me an idea on how to schedule it?
    Also i'd like to know what would be better a task scheduler or a windows service?
    Tuesday, March 3, 2009 10:23 AM
  • Actually I prefer a Console application if it's a scheduled thing. The you can also run it manually, easy, and print information to the display.
    A windows service will also do the job fine, mut it's more effort and complexity, and don't add much value in this kind of scenario. (personal opinion).

    You can find the "scheduled tasks" in the control panel on the server. It's quite intuitive hos to use it.

    Best regards
    Jens



    Monday, March 9, 2009 8:05 PM