locked
Workflow to execute external SQL Stored Procedure RRS feed

  • Question

  • I have the need to fire a external SQL stored procedure from a CRM workflow. Is this possible and are there any tutorials for this

    CRM2013


    Dont ask me .. i dont know

    Thursday, August 28, 2014 5:23 PM

Answers

  • I'd take a look at Custom Actions (you can read more about them in the SDK) and see if that will achieve what you want to do. Otherwise, you should be able to put external connection information in a plugin, assuming CRM can "see" where the SProc is stored.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    Thursday, August 28, 2014 6:25 PM

All replies

  • I'd take a look at Custom Actions (you can read more about them in the SDK) and see if that will achieve what you want to do. Otherwise, you should be able to put external connection information in a plugin, assuming CRM can "see" where the SProc is stored.

    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

    Thursday, August 28, 2014 6:25 PM
  • Is this sp on crm database? If, this is the case, you could use a workflow to update a field and use a trigger to call a sp.

    http://stackoverflow.com/questions/3768278/call-stored-procedure-within-create-trigger-in-sql-server


    Thursday, August 28, 2014 10:59 PM
  • You shouldn't use a trigger to call a stored procedure, at least not a trigger on a table in the CRM database. That wouldn't be supported. A custom workflow activity could potentially work as well here. 

    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Friday, August 29, 2014 1:14 AM
    Moderator
  • I agree Jason that the solution I outlined is unsupported. If you decide to create a SP in CRM database, you could also very well create a trigger - both are unsupported.

    Regards

    Jithesh

    Friday, August 29, 2014 5:01 AM