Jeniffer
05/21/2025, 7:05 PMCeligo AI
05/21/2025, 7:05 PMAI generated answer (using internal Slack threads):To get the price per quantity from a Purchase Contract Record using the N/record module in SuiteScript, you would need to load the record and then get the value of the relevant fields. Here's a basic example of how you might do this:
javascript
var record = require('N/record');
// Load the Purchase Contract Record
var purchaseContract = record.load({
type: 'purchasecontract',
id: 'YOUR_RECORD_ID'
});
// Get the value of the quantity and price fields
var quantity = purchaseContract.getValue({fieldId: 'quantity'});
var price = purchaseContract.getValue({fieldId: 'price'});
// Calculate the price per quantity
var pricePerQuantity = price / quantity;
Please replace 'YOUR_RECORD_ID'
with the actual ID of the Purchase Contract Record you want to retrieve. Also, replace 'quantity'
and 'price'
with the actual field IDs of the quantity and price fields in your Purchase Contract Record.
******
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
05/21/2025, 7:05 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.824993134
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808700323
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.806644082
Celigo AI
05/21/2025, 7:05 PMCeligo AI
05/21/2025, 7:07 PM