gpt4 book ai didi

java - 如何使用Java API在NetSuite中完成搜索?

转载 作者:行者123 更新时间:2023-12-02 04:58:50 25 4
gpt4 key购买 nike

我有一个 jar 文件 nsws-2014_1.jar,其中包含使用 Netsuite 的 Web 服务的绑定(bind)。我正在阅读他们在线提供的 pdf 中的示例,但搜索或查询令人困惑。我想完成某人在 perl 中完成的查询,但在 java 中完成。有人可以帮我吗?

my $query = {
basic => [
{ name => 'customFieldList', value => [
{
name => 'customField',
attr => {
scriptId => 'custentity_hexid',
operator => 'is',
'xsi:type' => 'core_2013_2.platform:SearchStringCustomField'
},
value => $json->{'ServiceOrder'}->{'Id'}
},
],
},
],
};

最佳答案

  CustomerSearch customerSrch = new CustomerSearch();
CustomerSearchBasic customerSrchBsc = new CustomerSearchBasic();

SearchStringCustomField custentity_externalid = new SearchStringCustomField();
custentity_externalid.setInternalId("1015");
custentity_externalid.setSearchValue(externalID);
custentity_externalid.setOperator(SearchStringFieldOperator.is);

SearchCustomFieldList searchCustomFieldList = new SearchCustomFieldList();
SearchCustomField[] SearchCustomFieldArray = {custentity_externalid};
searchCustomFieldList.setCustomField(SearchCustomFieldArray);
customerSrchBsc.setCustomFieldList(searchCustomFieldList);
customerSrch.setBasic(customerSrchBsc);


SearchResult searchResult = _service.search(customerSrch);

关于java - 如何使用Java API在NetSuite中完成搜索?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28497859/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com