Sunday, September 16, 2018

Web Services > .NET > Search Join example for Customers andContact records

The following code will search for a contact record with constraints and joining the customer record in the search.


This is a sample code in .NET on how to use the search join method using webservices.


ContactSearch contact = new ContactSearch();

SearchStringField strEmail = new SearchStringField();

strEmail.@operator = SearchStringFieldOperator.@is;

strEmail.operatorSpecified = true;

strEmail.searchValue = "";

ContactSearchBasic contactSB = new ContactSearchBasic(); = strEmail;

contact.basic = contactSB;

SearchStringField strEntityId = new SearchStringField();

strEntityId.@operator = SearchStringFieldOperator.@is;

strEntityId.operatorSpecified = true;

strEntityId.searchValue = "EMPL05";

CustomerSearchBasic customerSB = new CustomerSearchBasic();

customerSB.entityId = strEntityId;

contact.customerJoin = customerSB;;




Equivalent SOAP request:





    <searchRecord type="ContactSearch">


       <email operator="is">





      <entityId operator="is">









No comments:

Post a Comment