我想做的事情似乎很基本,应该是直截了当的,但我显然做错了什么。我只想根据tranid返回Sales Order对象。我的代码如下
require_once ('netsuite/PHPToolkit/NetSuiteService.php');
$ns = new NetSuiteService();
$ns->setSearchPreferences(false, 20);
$search = new TransactionSearchBasic();
$needle = new SearchStringField();
$needle->operator = "is";
$needle->searchValue = "SO1047429";
$search->tranid = $needle;
$req = new SearchRequest();
$req->searchRecord = $search;
try {
$res = $ns->search($req);
} catch (Exception $e) {
print_r ($e);
exit;
}
print_r ($res);
问题是,这将返回我们在Netsuite中的每条记录......
SearchResponse Object
(
[searchResult] => SearchResult Object
(
[status] => Status Object
(
[statusDetail] =>
[isSuccess] => 1
)
[totalRecords] => 3569384
[pageSize] => 20
[totalPages] => 178470
我希望这里的另一双眼睛可以发现我的错误,因为它让我疯狂。
答案 0 :(得分:1)
您没有正确指定“tranid” - 它需要一个大写“I”:
private var progressView: KDCircularProgress!
private func setupProgressView(){
progressView = KDCircularProgress(frame: CGRect(x: 100, y: 100, width: 100, height: 100))
progressView.startAngle = 90
progressView.angle = 90
progressView.trackColor = UIColor.red
progressView.progressColors = [UIColor.white]
progressView.center = view.center
}
应该阅读
viewDidLoad