mescalante
04/01/2026, 11:03 PMCeligo AI
04/01/2026, 11:03 PMAI generated answer (using internal Slack threads):To display Item Average Cost, Purchase Price, and Last Purchase Price in base Unit, you can use the SuiteScript API to get these values from the item record. Here is a sample code snippet that demonstrates how to do this:
javascript
var itemRecord = record.load({
type: record.Type.INVENTORY_ITEM,
id: 'your_item_id'
});
var avgCost = itemRecord.getValue({
fieldId: 'averagecost'
});
var purchasePrice = itemRecord.getValue({
fieldId: 'cost'
});
var lastPurchasePrice = itemRecord.getValue({
fieldId: 'lastpurchaseprice'
});
log.debug({
title: "Item Details",
details: "Average Cost: " + avgCost + ", Purchase Price: " + purchasePrice + ", Last Purchase Price: " + lastPurchasePrice
});
This script loads the item record, then retrieves the values of the 'averagecost', 'cost', and 'lastpurchaseprice' fields. The values are then logged for debugging purposes.
Please note that the 'averagecost' field is in stock units, while 'cost' and 'lastpurchaseprice' are in purchase units. If your item uses units of measure, you will need to convert these values accordingly.
******
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
04/01/2026, 11:03 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81439209
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813537717
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.81237781
Celigo AI
04/01/2026, 11:03 PM