reza.seedin
09/19/2017, 7:02 AMform.addButton({id: 'getLinesButton', label: 'Fetch Lines', functionName : 'getOrderLines'});
define(['N/url'], function(url) {
function getOrderLines(scriptContext) {
var vendor = scriptContext.currentRecord.getValue({ fieldId: 'custpage_vendor' });
// var vendor = nlapiGetFieldValue('custpage_vendor');
alert('getOrderLines' + vendor);
}
return {
pageInit: pageInit,
getOrderLines: getOrderLines
};
});
- First is this the correct way to fetch values, if so i'm sure i'm missing some small step cos i'm currently getting a error Uncaught TypeError: Cannot read property 'currentRecord' of undefined Thanks in advance...