gpt4 book ai didi

java - NetSuite 集成 - CustomFieldList 的问题

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

我正在尝试通过其 WebService 平台 (SuiteTalk) 创建与 NetSuite 的集成,但在使用 CustomField 保存客户时遇到问题。

这是我的代码:

        StringCustomFieldRef customField = new StringCustomFieldRef();
customField.setValue("9999999");
customField.setInternalId("custentity_xx_xxx_xxx");

CustomFieldRef[] customFields = new CustomFieldRef[1];
customFields[0] = customField;

Customer customer = new Customer();
customer.setSubsidiary(subs);
customer.setIsPerson(true);
customer.setFirstName("Joe");
customer.setLastName("Silver");
customer.setCustomFieldList(customFields);

_port.add(customer);

无论如何,它总是相同的响应:
[Fault Message]: org.xml.sax.SAXException: {urn:core_2016_1.platform.webservices.netsuite.com}CustomFieldRef is an abstract type and cannot be instantiated

我所做的与帮助中心的文档和示例中的完全一样。

有什么想法吗?

谢谢。

最佳答案

我使用 Python SDK 进行查找

custom_field = self.ns_client.SearchStringCustomField(searchValue='China', scriptId="cust_scriptId", operator='contains')
customFieldList = self.ns_client.SearchCustomFieldList(customField)
basic_search = self.ns_client.basic_search_factory('Item',
customFieldList=customFieldList)
paginated_search = PaginatedSearch(client=self.ns_client,
type_name='Item',
basic_search=basic_search,
pageSize=20)
return self._paginated_search_to_generator(paginated_search=paginated_search)
也许您可以使用数据进行查询
<soap-env:Body>
<ns0:search
xmlns:ns0="urn:messages_2019_1.platform.webservices.netsuite.com">
<ns0:searchRecord
xmlns:ns4="urn:accounting_2019_1.lists.webservices.netsuite.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:ItemSearch">
<ns1:basic
xmlns:ns1="urn:accounting_2019_1.lists.webservices.netsuite.com">
<ns2:customFieldList
xmlns:ns2="urn:common_2019_1.platform.webservices.netsuite.com">
<ns3:customField
xmlns:ns3="urn:core_2019_1.platform.webservices.netsuite.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" scriptId="custitem_origin" operator="contains" xsi:type="ns3:SearchStringCustomField">
<ns3:searchValue>China</ns3:searchValue>
</ns3:customField>
</ns2:customFieldList>
</ns1:basic>
</ns0:searchRecord>
</ns0:search>
</soap-env:Body>

关于java - NetSuite 集成 - CustomFieldList 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37729244/

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