1

Kind of embarrassed to post this here, but I'm at my wits end. I am trying to pull up a Sales Order in Netsuite, searching on a custom filed and using the PHP ToolKit, but have hit a brick wall. I've searched records on custom fields before and haven't had an issue, but this time I'm getting no results. This custom field is a place where we store an outside order number (like if the order came from Amazon or eBay) and I can pull up the record inside of Netsuite (using the GUI) with this custom field. Currently my code looks like this:

$ts = new TransactionSearch(); $tsb = new TransactionSearchBasic(); $oth = new SearchStringCustomField(); $oth->internalId = 69; $oth->searchValue = '700184356'; $oth->operator = 'is'; $cfl = new SearchCustomFieldList(); $cfl->customField = array($oth); $tsb->customFieldList = $cfl; $ts->basic = $tsb; $request = new SearchRequest(); $request->searchRecord = $ts; $response = $ns->search($request); 

I've double and triple checked the id of the custom field and also tried using its name instead of id ($oth->scriptId = 'custbody_custbody_storefront_order'). I get no errors, but also no records are returned. I'm hoping an extra set of eyes can spot what I'm doing wrong.

Custom field name

1
  • (1) If I remember correctly, Amazon order number is 17-character (typically with hypens) , whereas eBay order number is 12-digit. (2) search operator can be 'is', 'contains', 'startsWith' and so on Commented Oct 2 at 15:18

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.