Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
pageInit and default sublist values
I am trying to update the PORate field with another field on the item sublist when a quote is copied to a Sales Order. However the values are not updating. I am using a pageInit to update the fields after they're loading during the copy process. Any ideas on how to make this work?
pageInit(type)
{
//Check if order is being created from an estimate
var stCreatedFrom = nlapiGetFieldValue('createdfrom');
if (stCreatedFrom != null && type == 'copy')
{
var lineNum = nlapiGetLineItemCount('item');
// Run through each line item looking for items.
for ( i = 1; i <= lineNum; i++)
{
var stUnitCost = nlapiGetLineItemValue('item','costestimaterate',i);
nlapiSetLineItemValue('item', 'porate', i, stUnitCost);