Aaron McCausland
08/07/2025, 9:21 PMCeligo AI
08/07/2025, 9:21 PMAI generated answer (using internal Slack threads):****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** To find out if the currently selected line is a tax item using the N/record API on an Invoice record, you can use the
getSublistValue
method. This method allows you to get the value of a field on a sublist line.
Here is a sample code snippet:
javascript
var taxCode = invoice.getSublistValue({
sublistId: 'item',
fieldId: 'taxcode',
line: i
});
In this code, 'item' is the sublistId, 'taxcode' is the fieldId, and 'i' is the line number. The getSublistValue
method will return the value of the 'taxcode' field on the 'item' sublist for the specified line number.
If the returned value is a tax code or tax group, then the currently selected line is a tax item. If the returned value is not a tax code or tax group, then the currently selected line is not a tax item.
Please note that this method should be used in dynamic mode. In dynamic mode, you need to select the line first using the selectLine
method and commit the line after using the commitLine
method.
Here is a sample code snippet:
javascript
invoice.selectLine({
sublistId: 'item',
line: i
});
var taxCode = invoice.getCurrentSublistValue({
sublistId: 'item',
fieldId: 'taxcode'
});
invoice.commitLine({
sublistId: 'item'
});
In this code, 'item' is the sublistId, 'taxcode' is the fieldId, and 'i' is the line number. The getCurrentSublistValue
method will return the value of the 'taxcode' field on the 'item' sublist for the currently selected line.
If the returned value is a tax code or tax group, then the currently selected line is a tax item. If the returned value is not a tax code or tax group, then the currently selected line is not a tax item.Celigo AI
08/07/2025, 9:22 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823166192
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816507459
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813284457
Celigo AI
08/07/2025, 9:22 PM