Hi Developers! I need some help with a suitetalk q...
# suitetalkapi
p
Hi Developers! I need some help with a suitetalk question, if I've posted this in the wrong channel please let me know, I have never posted here before as I posted in the suitescript chanel before and was directed here. I am exporting transaction data and I am wanting to look at the GL impact data for transactions. The GL impact does not appear to come out on transactions and for most transactions this is easy to deal with (ie GL impact of an invoice is just the amount of the invoice). Where I am having trouble is item fulfillments which needs to cost of goods sold at the time of the item fulfillment (not an easy calculation). I've done some reading and it seems that SuiteQL has a table called TransactionAccountingLine, which I believe should correspond to the AccountingTransactionSearch table. Though joining a Transaction search to an accountingTransactionSearch hasn't helped. Could I please get some help! I've given the java code for the latest search attempt below.
Copy code
RecordRef[] ref = new RecordRef[1];
ref[0] = new RecordRef();
ref[0].setInternalId("2316531");
SearchMultiSelectField internalIds = new SearchMultiSelectField(ref , SearchMultiSelectFieldOperator.anyOf);
TransactionSearchBasic transactionSearchBasic = new TransactionSearchBasic();
transactionSearchBasic.setInternalId(internalIds);
TransactionSearchAdvanced transactionSearchAdvanced = new TransactionSearchAdvanced();
TransactionSearch transactionSearch = new TransactionSearch();
transactionSearch.setBasic(transactionSearchBasic);
transactionSearch.setAccountingTransactionJoin(new AccountingTransactionSearchBasic());
TransactionSearchRow transactionSearchRow = new TransactionSearchRow();
TransactionSearchRowBasic transactionSearchRowBasic = new TransactionSearchRowBasic();
transactionSearchRow.setBasic(transactionSearchRowBasic);
transactionSearchRow.setCogsPurchaseJoin(transactionSearchRowBasic);
transactionSearchRow.setCogsSaleJoin(transactionSearchRowBasic);
transactionSearchRow.setAccountingTransactionJoin(new AccountingTransactionSearchRowBasic());
transactionSearchAdvanced.setCriteria(transactionSearch);
transactionSearchAdvanced.setColumns(transactionSearchRow);
b
the Accounting Transaction Search is associated with multi book accounting
even if it was for gl, you would actually need to include columns or filters from it to actually do something, like in the Joined Search Code Samples
in general, you will want to start in the ui with a saved searh, and start adding columns like the account and amounts to see how saved searches represent accounting impacts