Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
2012.1 breaks validateField using nlapiGetCurrentLineItemValue()
In suitescript, validateField scripts are supposed to allow us to validate a fields values before the field is changed.
For a normal body field, this works as expected.
> nlapiGetFieldValue('custbody_notes_add')
"123"
//changing field from 123 to 123456
media.nl:397 jm_validateField: type:null name:custbody_notes_add
> nlapiGetFieldValue('custbody_notes_add')
"123456"
media.nl:195 jm_fieldChanged: type:null name:custbody_notes_add
> nlapiGetFieldValue('custbody_notes_add')
"123456"
For a column field this does not work correctly.
> nlapiGetCurrentLineItemValue('item','custcol_qty_bo')
"0"
//changing field from 0 to 1
media.nl:397 jm_validateField: type:item name:custcol_qty_bo
> nlapiGetCurrentLineItemValue('item','custcol_qty_bo')