locked
Can we Host Custom WCF service in XRMServces folder? RRS feed

  • Question

  • Can we Host Custom WCF service in XRMServces folder?
    Tuesday, August 28, 2012 4:46 PM

Answers

  • No, you are not allowed to put any files into the CRM Website anymore

    What are you trying to use the WCF web service for?

    Is this for receiving data from another system. A trick I have used in the past is to create a custom entity and create fields in that entity for the fields you want to expose in the web service. The program referencing the web service can call the create message populating the fields. I then have a pre-create plugin that fires to validate the create message and which then populates the bits of CRM I want it to. I create a user for the web service with permission only to create on this custom entity. I like this method as it gives me a audit of calls as well

    If this is for supplying data to an external system, I have used a similar trick e.g. the calling progress does a retrieve or retrievemultiple on a custom entity (again will need fields in for each fields you want to expose to the external system) passing in say the postcode, I have a postretrieve/postretrievemultiple plugin that discards the results from the call to CRM and populates with my own query. In this way I can control what is returned.


    Microsoft Dynamics CRM Specialist and MCT www.vigence.co.uk

    • Marked as answer by MSCRMrocks Wednesday, August 29, 2012 2:33 AM
    Tuesday, August 28, 2012 5:10 PM
  • I did something similar to calculate energy efficiency of a building by calling third party web services.

    Try this approach

    1. Create a custom entity and add fields to this entity for each field that needs to be passed to the third party system and a field for the result value that will be stored in CRM

    2. Create a pre-create plugin on this custom entity and use the re-code from your WCF web service. This plugin will call the third party systems, do calculations etc and set the return value field.

    3. In your JScript use OData to issue a create against the custom entity passing in the values required by the third party system

    4. Parse the result from the OData call and store in in CRM

    This will work under all deployment scenarios including on-premise/IFD/CRM Online and deosn't require any files to be placed on the server.


    Microsoft Dynamics CRM Specialist and MCT www.vigence.co.uk

    • Marked as answer by MSCRMrocks Wednesday, August 29, 2012 2:33 AM
    Tuesday, August 28, 2012 5:35 PM

All replies

  • Simple answer is No

    Would have to be a separate Web Site, personally I would look at Azure and hook into CRM via Azure


    Microsoft Dynamics CRM Specialist and MCT www.vigence.co.uk

    Tuesday, August 28, 2012 4:57 PM
  • Hi Julian,

    Thanks a lot.

    Can we host WCF service in ISV folder?

    If so what are the necessary configurations parameters required

    Tuesday, August 28, 2012 5:00 PM
  • No, you are not allowed to put any files into the CRM Website anymore

    What are you trying to use the WCF web service for?

    Is this for receiving data from another system. A trick I have used in the past is to create a custom entity and create fields in that entity for the fields you want to expose in the web service. The program referencing the web service can call the create message populating the fields. I then have a pre-create plugin that fires to validate the create message and which then populates the bits of CRM I want it to. I create a user for the web service with permission only to create on this custom entity. I like this method as it gives me a audit of calls as well

    If this is for supplying data to an external system, I have used a similar trick e.g. the calling progress does a retrieve or retrievemultiple on a custom entity (again will need fields in for each fields you want to expose to the external system) passing in say the postcode, I have a postretrieve/postretrievemultiple plugin that discards the results from the call to CRM and populates with my own query. In this way I can control what is returned.


    Microsoft Dynamics CRM Specialist and MCT www.vigence.co.uk

    • Marked as answer by MSCRMrocks Wednesday, August 29, 2012 2:33 AM
    Tuesday, August 28, 2012 5:10 PM
  • We are having a custom WCF service. It interacts with thrid party systems and returns a value this value will be stored in CRM. we need to call that WCF service from MSCRM using client side scripting.
    Tuesday, August 28, 2012 5:19 PM
  • I did something similar to calculate energy efficiency of a building by calling third party web services.

    Try this approach

    1. Create a custom entity and add fields to this entity for each field that needs to be passed to the third party system and a field for the result value that will be stored in CRM

    2. Create a pre-create plugin on this custom entity and use the re-code from your WCF web service. This plugin will call the third party systems, do calculations etc and set the return value field.

    3. In your JScript use OData to issue a create against the custom entity passing in the values required by the third party system

    4. Parse the result from the OData call and store in in CRM

    This will work under all deployment scenarios including on-premise/IFD/CRM Online and deosn't require any files to be placed on the server.


    Microsoft Dynamics CRM Specialist and MCT www.vigence.co.uk

    • Marked as answer by MSCRMrocks Wednesday, August 29, 2012 2:33 AM
    Tuesday, August 28, 2012 5:35 PM
  • http://msdn.microsoft.com/en-us/library/gg695790.aspx#CreateDataService

    Carsten Groth http://carstengroth.wordpress.com Microsoft Dynamics Certified Technology Specialist CRM Online 30 Tage kostenfrei testen – http://crm.dynamics.com/de-de/trial-overview

    Tuesday, August 28, 2012 7:26 PM