How to display related records of transaction in d...
# ask-stanley-ai
i
How to display related records of transaction in dataset?
c
AI generated answer (using internal Slack threads):
To display related records of a transaction in a dataset, you can use the
Applying transaction
and
Applied to transaction
joins in either direction for all transactions that are "related" records. If you want to see the type of join they are/how they are linked, then add
applying link type
and
applied to link type
. In SuiteAnalytics, the joins are named differently. They are called
Related Transactions - Next
and
Related Transactions - Previous
. Here is an example of how you can use these joins in a search:
Copy code
javascript
var filters = [];
filters.push(new nlobjSearchFilter('mainline', null, 'is', 'T'));

var columns = [];
columns.push(new nlobjSearchColumn('tranid', null, null));
columns.push(new nlobjSearchColumn('tranid', 'applyingTransaction', null));
columns.push(new nlobjSearchColumn('tranid', 'appliedToTransaction', null));

var search = nlapiCreateSearch('transaction', filters, columns);
var resultSet = search.runSearch();
This script will return a list of transactions and their related records. Please note that the
Applying transaction
and
Applied to transaction
fields are not part of the record object, so you cannot access them directly like you would with line items. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821777344
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.819152832
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811096251
Please provide your feedback on this answer.