Milcho Dimkov
06/01/2025, 1:11 PMCeligo AI
06/01/2025, 1:11 PMAI generated answer (using internal Slack threads):To list the lines under "Credits Applied" sublist for a "Bill Payment" transaction, you can use SuiteScript, SuiteQL, or a saved search. Here is a sample SuiteScript:
javascript
var billPaymentId = '123'; // replace with your Bill Payment internal id
var billPaymentRecord = record.load({
type: record.Type.VENDOR_PAYMENT,
id: billPaymentId
});
var lineCount = billPaymentRecord.getLineCount({sublistId: 'apply'});
for (var i = 0; i < lineCount; i++) {
var apply = billPaymentRecord.getSublistValue({sublistId: 'apply', fieldId: 'apply', line: i});
if (apply) {
var doc = billPaymentRecord.getSublistValue({sublistId: 'apply', fieldId: 'doc', line: i});
var amount = billPaymentRecord.getSublistValue({sublistId: 'apply', fieldId: 'amount', line: i});
log.debug('doc: ' + doc + ', amount: ' + amount);
}
}
For SuiteQL, you can use the nextlinks
and previouslinks
columns on transaction
to traverse the links. Here is a sample SuiteQL:
sql
SELECT
T.ID, T.TRANID, T.TYPE, T.AMOUNT, T.APPLIEDTO
FROM
TRANSACTION T
WHERE
T.TYPE = 'Bill Payment' AND T.ID = '123' -- replace with your Bill Payment internal id
For a saved search, you can use the "Applied To Transaction" field to list the Bill Credits for a Bill Payment. However, please note that Bill Payments and Bill Credits are not directly linked in saved searches. You might want to use Type = Bill instead so you can capture both.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
06/01/2025, 1:11 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.885040104
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.876021445
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.868263364
Celigo AI
06/01/2025, 1:11 PM