Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
small script for price calculation
i want to calculate the minimum price we can sell an item based on the weight and the tax class. im new to suitescript, but heres what i have:
function AZmin()
{
var weight = nlapiGetFieldValue('weight');
if (weight <= 749)
{
var shipping = 2.87;
}
if (weight >= 750 && weight <=999)
{
var shipping = 3.49;
}
if (weight >= 1000)
{
var shipping = 5.67;
}
var avgcost = nlapiGetFieldValue('averagecost');
var taxcode = nlapiGetFieldValue('salestaxcode');
if (taxcode == "VAT:S")
{
var minprice = ((avgcost + shipping) /0.68);
}
if (taxcode == "VAT:C")
{
var minprice = ((avgcost + shipping) /0.8);
}
if (taxcode == "VAT:Z")
{
var minprice = ((avgcost + shipping) /0.85);
}
nlapiSetFieldValue("custitem_minprice", minprice);
return true;
}
I thought I could apply this to inventory items in the script deployment, but i cant. What would be the best way to implement this?