Hagar Ahmed
09/25/2024, 11:37 AMCeligo AI
09/25/2024, 11:39 AMAI generated answer (using internal Slack threads):To get only item receipt transactions in a query, you can use the 'type' field in the transaction record to filter out only item receipt transactions. Here is an example of how you can do this in SuiteScript:
javascript
var search = require('N/search');
var transactionSearch = search.create({
type: search.Type.TRANSACTION,
filters: [
['type', search.Operator.ANYOF, 'ItemRcpt']
],
columns: ['tranid', 'trandate', 'entity', 'total']
});
var searchResult = transactionSearch.run().getRange({
start: 0,
end: 100
});
for (var i = 0; i < searchResult.length; i++) {
var tranid = searchResult[i].getValue({
name: 'tranid'
});
var trandate = searchResult[i].getValue({
name: 'trandate'
});
var entity = searchResult[i].getValue({
name: 'entity'
});
var total = searchResult[i].getValue({
name: 'total'
});
log.debug('tranid', tranid);
log.debug('trandate', trandate);
log.debug('entity', entity);
log.debug('total', total);
}
In this example, the 'type' filter is set to 'ItemRcpt' which corresponds to item receipt transactions. The columns 'tranid', 'trandate', 'entity', and 'total' are then retrieved for each item receipt transaction.
******
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
09/25/2024, 11:39 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808785737
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803907216
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.803402543
Celigo AI
09/25/2024, 11:39 AM