Hi,
I'm having issues with search customer record through ItemSearchBasic, i'm trying to search customer with a double custom field as my search value,
Here is my code.
$customerSearchParam = new nsComplexObject('SearchDoubleCustomField');
$customerSearchParam->setFields(array('searchValue' => '' ,'operator' => 'equalTo', 'internalId' => 'custentity1'));
$searchItemFields = array('customFieldList' => array($customerSearchParam));
$customerSearchBasic = new nsComplexObject("CustomerSearchBasic");
$customerSearchBasic->setFields($searchItemFields);
$searchResponse = $myNSclient->search($customerSearchBasic);
here is my soap request:
<SOAP-ENV:Envelope xmlns:ns3="urn:messages_2011_2.platform.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:core_2011_2.platform.webservices.netsuite.com" xmlns:ns2="urn:common_2011_2.platform.webservices.netsuite.com">
<SOAP-ENV:Header>
<ns1: passport SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next">
<email>it@iclickdigishop.com</email>
<password>********</password>
<account>3307262</account>
<role xsi:type="ns1:RecordRef" internalId="3"/>
</ns1: passport>
<ns3:searchPreferences SOAP-ENV:actor="http://schemas.xmlsoap.org/soap/actor/next">
<bodyFieldsOnly>true</bodyFieldsOnly>
<pageSize>10</pageSize>
</ns3:searchPreferences>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns3:search>
<ns3:searchRecord xsi:type="ns2:CustomerSearchBasic">
<ns2:customFieldList>
<ns1:customField xsi:type="ns1:SearchDoubleCustomField" operator="equalTo" internalId="custentity1"/>
</ns2:customFieldList>
</ns3:searchRecord>
</ns3:search>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
and here is the response:
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<platformMsgs:documentInfo xmlns: platformMsgs="urn:messages_2011_2.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_3307262_070420121365745327829033491_dd3511706841</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<searchResponse xmlns="urn:messages_2011_2.platform.webservices.netsuite.com">
<platformCore:searchResult xmlns: platformCore="urn:core_2011_2.platform.webservices.netsuite.com">
<platformCore:status isSuccess="false">
<platformCore:statusDetail type="ERROR">
<platformCore:code>INVALID_SEARCH_FIELD_OBJ</platformCore:code>
<platformCore:message>custentity1 is not a valid search custom field</platformCore:message>
</platformCore:statusDetail>
</platformCore:status>
</platformCore:searchResult>
</searchResponse>
</soapenv:Body>
</soapenv:Envelope>
Will appreciate anyone who could help me on this.
Thanks.