RE: How to extract Invoice Related Records using transaction search.
Hi,
We are trying to extract the Invoice from Netsuite along with the related records. We are able to extract the Invoice and Lines without any issues but we are not able to extract the Related Records of Invoice which has Credit Memo’s and Journal Entries. Below are the sample code we use.
TransactionSearch transactionsSearch = new TransactionSearch();
TransactionSearchBasic transactionSearchBasic = new TransactionSearchBasic();
transactionSearchBasic.type = new SearchEnumMultiSelectField();
transactionSearchBasic.type.@operator = SearchEnumMultiSelectFieldOperator.anyOf;
transactionSearchBasic.type.operatorSpecified = true;
transactionSearchBasic.type.searchValue = new string[] { “_invoice” };
ransactionsSearch.basic = transactionSearchBasic;
SearchPreferences sp = new SearchPreferences();
sp.pageSize = fetch_count;
sp.pageSizeSpecified = true;
sp.bodyFieldsOnly = false;
_service.searchPreferences = sp;
SearchResult result = _service.search(transactionsSearch);
It is a production issue so any help is highly appreicated.
Thanks and Regards
Venkatesan
To get related records you need to join to them. I do not know the suitetalk syntax for doing that but they can be reached with applying transaction and applied to transaction joins (depends which direction you want to go).
Thank you for your help SouthsideSandii, Please let us know if you get any info on the syntax.