简体   繁体   English

使用 SuiteTalk 搜索 Netsuite InboundShipment

[英]Searching for a Netsuite InboundShipment using SuiteTalk

I am trying to do a search to find out if there is an existing InboundShipment in NetSuite with a given ExternalDocumentValue.我正在尝试进行搜索以查明 NetSuite 中是否存在具有给定 ExternalDocumentValue 的现有 InboundShipment。

The problem I am having is the ExternalDocumentNumber is a string but the InboundShipmentSearch seems to be wanting a RecordRef array and I do not know what value to create the recordRef with.我遇到的问题是 ExternalDocumentNumber 是一个字符串,但 InboundShipmentSearch 似乎想要一个 RecordRef 数组,我不知道用什么值来创建 recordRef。 Here is my current code这是我当前的代码

        InboundShipmentSearchAdvanced isa = new InboundShipmentSearchAdvanced();
       // isa.criteria.basic.externalDocumentNumber.searchValue = 

        InboundShipmentSearchBasic ts = new InboundShipmentSearchBasic();
        Client.SearchPreferences.bodyFieldsOnly = false;

        isa.criteria = new InboundShipmentSearch();
        isa.criteria.basic = new InboundShipmentSearchBasic();
        isa.criteria.basic.externalDocumentNumber = new SearchMultiSelectField();
        isa.criteria.basic.externalDocumentNumber.@operator =SearchMultiSelectFieldOperator.anyOf;
        List<RecordRef> rrlist = new List<RecordRef>();
        RecordRef rr = new RecordRef();  RecordType.
        rr.name = "HJ_InboundShip_1";  // I don't think this is what I need to prime the record ref. 
        rrlist.Add(rr);
        isa.criteria.basic.externalDocumentNumber.searchValue = rrlist.ToArray();         

The issue is since that value is a string and does not really seem to relate to any linked record in the schema, I don't know how to set up the rec.问题是因为该值是一个字符串并且似乎与架构中的任何链接记录都没有关系,我不知道如何设置 rec. ref for the search.参考搜索。 I wondered if anyone had any idea of what I would need to do that.我想知道是否有人知道我需要做什么。

RecordRef's are a way to define a record lookup for links to existing records, and need instantiation with the either the internalid or externalid of the record. RecordRef 是一种为指向现有记录的链接定义记录查找的方法,需要使用记录的 internalid 或 externalid 进行实例化。 See SuiteAnswers id 10801 .请参阅SuiteAnswers id 10801

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM