Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Search order by externalId error
I am a novice,and My English is not very good.I want to search order by externalId ,but i am fail search,can you tell me How to solve it.
TransactionSearch transactionSearch = new TransactionSearch();
TransactionSearchBasic transactionSearchBasic = new TransactionSearchBasic();
RecordRef[] arryrec = new RecordRef[2];
RecordRef subsl = new RecordRef();
subsl.type = RecordType.subsidiary;
subsl.internalId = "15";
arryrec[0] = subsl;
RecordRef exid = new RecordRef();
exid.type = RecordType.salesOrder;
exid.externalId = TextBox1.Text.Trim();
exid.typeSpecified = true;
arryrec[1] = exid;
SearchMultiSelectField externalId = new SearchMultiSelectField();
externalId.@operator = SearchMultiSelectFieldOperator.noneOf;
externalId.operatorSpecified = true;
externalId.searchValue = arryrec;
transactionSearchBasic.externalId = externalId;
transactionSearch.basic = transactionSearchBasic;
SearchResult searchRes = _service.search(transactionSearch);