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.
updating s.no only for items other than disount
Hi all,
I have an user event script of after submit in my sales order form that automatically updates a custom column field s.no by incrementing.
Its getting good.
But my issue is i just want it to increment only to those items other than discount items.
so for discount items it should get blank..
So, please help me with this.
Here is my code:
function afterSubmitAppend(type)
{
var newId = nlapiGetRecordId();
var newType = nlapiGetRecordType(); //salesorder
var loadproj = nlapiLoadRecord(newType, newId);
var projid = loadproj.getFieldValue('custbody6');
var itemCount = loadproj.getLineItemCount('item'); //2
for (var i = 1; i <= itemCount; i++)
{
loadproj.setLineItemValue('item', 'custcol23', i, projid);