【问题标题】:SuiteTalk: how do I get Custom Segment list valuesSuiteTalk:如何获取自定义细分列表值
【发布时间】:2021-11-18 15:19:26
【问题描述】:
我可以使用以下代码获取自定义细分列表:
List<CustomizationRef> getCustIdResult = client.getCustomizationId(GetCustomizationType.customSegment, true);
if (getCustIdResult == null)
return new ArrayList();
List<?> returnedRows = client.getRecords(getCustIdResult);
但这只是给了我段名称和 ID,而不是列表值。如何获取值?
【问题讨论】:
标签:
soap
netsuite
suitetalk
【解决方案1】:
根据Suite Answer 84991 使用 SuiteTalk SOAP Web 服务,您可以使用 getCustomizationId 操作列出现有的自定义段。 要获取自定义段值,请使用 CustomRecordSearch 操作。
Suite Answer 84991 还指出:“当自定义细分应用于自定义记录类型或自定义细分的应用程序和采购子选项卡上的其他记录类型之一时,您无法检索有关已创建字段的信息使用其脚本ID和customizationRef从自定义段中获取。您只能通过其内部ID获取字段信息。所以请注意这一点。
Suite Answer 65812 提供了以下从自定义细分中获取值的示例:
<soapenv:Body>
<search xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<searchRecord xsi:type="ns7:CustomRecordSearchBasic" xmlns:ns7="urn:common_2017_1.platform.webservices.netsuite.com">
<ns7:recType internalId="24" scriptId="customrecord_cseg_example" type="customRecordType" xsi:type="ns8:CustomizationRef" xmlns:ns8="urn:core_2017_1.platform.webservices.netsuite.com">
<ns8:name xsi:type="xsd:string">WS Segment Example</ns8:name>
</ns7:recType>
</searchRecord>
</search>
</soapenv:Body>