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

    Querying Contact Using WS1.0

    Daya-329645
      Hi,

      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
      else
      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:ListOfContact>
      <con:Contact>
      <con:ContactFirstName>='Jennifer'</con:ContactFirstName>
      <con:ContactLastName>='Hershey'</con:ContactLastName>
      <con:WorkPhone>='+1 937 4187109'</con:WorkPhone>
      </con:Contact>
      </con:ListOfContact>
      </ContactWS_ContactQueryPage_Input>

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

          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.

          http://www.dubant.com/