我正在尝试使用PHP工具包使用NetSuite SuiteTalk API进行搜索。
如果我只使用一个过滤器 - 电子邮件,但在我添加辅助过滤器(被注释掉的部分)时返回错误,则搜索有效。
<?php
require_once '..\PHPToolkit\NetSuiteService.php';
$netsuiteService = new NetSuiteService();
$emailSearch = new SearchStringField();
$emailSearch->operator = "is";
$emailSearch->searchValue = "testing@gmail.com";
//$subsidiarySearch = new SearchEnumMultiSelectField();
//$subsidiarySearch->searchValue = [1];
//$subsidiarySearch->operator = 'anyOf';
$search = new CustomerSearchBasic();
$search->email = $emailSearch;
//$search->subsidiary =$subsidiarySearch;
$searchRequest = new searchRequest();
$searchRequest->searchRecord =$search;
$searchResponse = $netsuiteService->search($searchRequest);
?>
答案 0 :(得分:0)
子公司不是枚举。使用SearchMultiSelect。
搜索值为RecordRef。
首先创建RecordRef,然后将其分配给multiSelect的searchValue。