locked
Not able to access AssociateEntitiesRequest class CRMService RRS feed

  • Spørgsmål

  • Hello,

     I have referenced CRMService in my Web Application,I am not able to access the AssociateEntitiesRequest Class from it.how can i get this class in my code.

    31. august 2010 20:25

Svar

  • Hello Rhett,

      problem was with my CrmService

    now i figured it out, the AssociateEntitiesRequest and AssociateEntitiesResponse Classes are available in 

    http://test-1:5555/MSCrmServices/2007/CrmService.asmx

     

    and are not available in http://test-1:5555/MSCrmServices/2006/CrmService.asmx

     

    now my next question is after updating my CrmService, i run the crm code i am got the following error when it hits the hits the Fetch method of CrmService:

    "Server did not recognize the value of HTTP Header SOAPAction:  http://schemas.microsoft.com/crm/2007/WebServices/Fetch."

     

    3. september 2010 22:02
  • Well done resolving the class issue, with regards to the most recent message I'll direct you to the MSDN Fetch method example. http://msdn.microsoft.com/en-us/library/bb928998.aspx

    The only thing I can think of is that you may have your reference added to the project using the http://test-1:5555/MSCrmServices/2007/CrmService.asmx address but your still setting the url in code to the old 2006 url. If not, in VS clean your project and then do a Rebuild.


    MSCRM Bing'd - http://bingsoft.wordpress.com
    4. september 2010 22:09
    Redaktør

Alle besvarelser

  • Did you follow all of the directions here: http://msdn.microsoft.com/en-us/library/cc151102.aspx

    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    31. august 2010 21:23
    Redaktør
  • Have you added a using reference to your code.

    example.

    using yourCRMServiceReference;


    MSCRM Bing'd - http://bingsoft.wordpress.com
    31. august 2010 21:27
    Redaktør
  • yes i have added the using reference in my code.

    using Aivea.Acs.Integration.MsCrm;
    

    31. august 2010 21:45
  • I cannot test at the mo but if you add a reference to the Microsoft.Crm.sdk.dll you will have it.
    MSCRM Bing'd - http://bingsoft.wordpress.com
    31. august 2010 21:52
    Redaktør
  • I tried using microsoft.crm.sdktypeproxy.dll, and i got lots of error while object casting between or Crm WebService obj and Microsoft.Crm.SdkTypeProxy.CrmService obj.

     can i achieve this using our CRM WebService?

    31. august 2010 23:37
  • You can't use both the Web Service and the Assemblies, at least not without significant headache.  If you intend to use the Web Service, you should probably remove the Assemblies.  I think Rhett intended to ask you to switch your SDK method from Web Services to Assemblies, rather than use both.  You shouldn't have any trouble with the "AssociateEntitiesRequest" class from the Web Services, as long as your "using" statement has the proper path to the reference in your project.
    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    31. august 2010 23:57
    Redaktør
  • Hi,

    You can achieve it by using CRM SDK.dll as well as CRM Web Services. But do not add both. As the reference ambiguity will occur.
    Solution: Create one class: which will have reference only to CRM Web Service. Add your function which deals with the AssociateEntitites Message.

    Please see the below link : AssociateEntitites Message:
    http://msdn.microsoft.com/en-us/library/cc155954.aspx

    Hope this helps.


    Thanks, Ranjitsingh R | http://mscrm-developer.blogspot.com/ | MS CRM Consultant
    1. september 2010 03:26
  • I am using CRM Web Services, when i type AssociateEntitiesRequest class,the intellisense says "Does not exist in namespace or (are you missing any assembly refrence)".

    my question is why am i not able to get this class type from my Crm Service?and if possible how can i get this done. 

    1. september 2010 16:57
  • Have you tried changing to the sdk classes as I mention above.
    MSCRM Bing'd - http://bingsoft.wordpress.com
    1. september 2010 19:25
    Redaktør
  • if i use sdk classes i will not be able to access my CRM customized entities.
    1. september 2010 20:44
  • Ok, if you do not want to change because you prefer the web reference way, have you tried CrmService.AssociateEntitiesRequest
    MSCRM Bing'd - http://bingsoft.wordpress.com
    1. september 2010 22:45
    Redaktør
  • Yes, i tried Crmservice.AssociateEntitiesRequest.

    question:when i add the web service reference in my project, it asks me to provide CRM Login Credentials, I provided my credentials since i have full access to CRM.

    1)Do u think i should be accessing the Crm Service with System Administrator credentials?

    2)do u think any  CRM roles  settings required for particular CRM User?

    1. september 2010 23:55
  • Hello Rhett,

      problem was with my CrmService

    now i figured it out, the AssociateEntitiesRequest and AssociateEntitiesResponse Classes are available in 

    http://test-1:5555/MSCrmServices/2007/CrmService.asmx

     

    and are not available in http://test-1:5555/MSCrmServices/2006/CrmService.asmx

     

    now my next question is after updating my CrmService, i run the crm code i am got the following error when it hits the hits the Fetch method of CrmService:

    "Server did not recognize the value of HTTP Header SOAPAction:  http://schemas.microsoft.com/crm/2007/WebServices/Fetch."

     

    3. september 2010 22:02
  • Well done resolving the class issue, with regards to the most recent message I'll direct you to the MSDN Fetch method example. http://msdn.microsoft.com/en-us/library/bb928998.aspx

    The only thing I can think of is that you may have your reference added to the project using the http://test-1:5555/MSCrmServices/2007/CrmService.asmx address but your still setting the url in code to the old 2006 url. If not, in VS clean your project and then do a Rebuild.


    MSCRM Bing'd - http://bingsoft.wordpress.com
    4. september 2010 22:09
    Redaktør