Discussions
Lookup item field from transaction form
HI,
I am trying to limit my fieldchanged code as I do some calculations on the line item if its a certain type of product. I have a checkbox within the item that specifies whether or not to excute the calcs.
At the begining of the field changed I have this code which (I was hoping) would lookup that value when a new line item is selected.
var record = nlapiGetNewRecord();
var Item = record.getFieldValue('custitem_product')
var Product = nlapiLookupField('item', Item, 'custitem_product');
if (Product == true)
{ ... rest of code...
Any help on this would be great.
Cheers,
Johann