How to get itemList from Purchase Orders ?

Hi,

I need to use such code for retrieving Purchase Order due to its working very fast

TransactionSearchAdvanced transactionSearchAdvancedObject = new TransactionSearchAdvanced();
TransactionSearchBasic tr = new TransactionSearchBasic();
SearchStringField searchStringFieldItem = new SearchStringField() { searchValue = orderNum, @operator = SearchStringFieldOperator.@is, operatorSpecified = true };
SearchEnumMultiSelectField searchEnumFieldItem = new SearchEnumMultiSelectField()
{
@operator = SearchEnumMultiSelectFieldOperator.anyOf,
searchValue = new[] { “_purchaseOrder” },
operatorSpecified = true
};

tr.tranId = searchStringFieldItem;
tr.type = searchEnumFieldItem;
transactionSearchAdvancedObject.criteria = new TransactionSearch() { basic = tr };
transactionSearchAdvancedObject.columns = new TransactionSearchRow() { basic = new TransactionSearchRowBasic()
{
tranId = new SearchColumnStringField[1] { new SearchColumnStringField() }
,
entity = new SearchColumnSelectField[1] { new SearchColumnSelectField() }
} };

SearchResult searchResult = _nsService.search(transactionSearchAdvancedObject);

SearchRow[] records = searchResult.searchRowList;

 

But I do not how to get itemList here

Please help me to retrieve itemList for Purchase Order

Rookie Asked on March 22, 2023 in Other.
Add Comment
1 Answer(s)

Hi,

I don’t believe you’ve added any columns to your search here. What do you see returned?

This snipped might help:

RE: How to get itemList from Purchase Orders ?

Thanks,

Chris

Intermediate Answered on March 29, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor