1 Reply Latest reply on Apr 4, 2013 3:04 PM by Charles Dubant[eFrontech]

    Querying Contact Using WS1.0


      I have a scenario where I need to query a contact in CRM .
      If (contact already present in crm)
      I have to assign a case to him
      Create contact
      Assign Case.

      I am trying to query contact based on firstname AND Lastname AND WorkPhone , thought the contact is present in CRM ,the query response is empty.

      My request is as follows :

      -----------<ContactWS_ContactQueryPage_Input xmlns="urn:crmondemand/ws/contact/10/2004" xmlns:con="urn:/crmondemand/xml/contact">
      <con:WorkPhone>='+1 937 4187109'</con:WorkPhone>

      Kindly request help on querying contact based on telephone number
        • 1. Re: Querying Contact Using WS1.0
          Charles Dubant[eFrontech]

          Does this type of query work on other objects? I never seen webservices queries with embedded "=" in the tags.

          Anyway you should use the "searchspec" attribute to filter your results (that's how I do it).

          Consider replacing your line :

          <con:Contact searchspec="">

          with the following :

          <con:Contact searchspec="[ContactLastName] ='Hershey' AND [ContactFirstName] ='Jennifer' AND [WorkPhone] ='+1 937 4187109'">

          I'm not sure about the "AND" but it works for a single filter, it should work with an "AND".

          Charles DUBANT.