function getPOnum()
{
var POnum;
var countLine = nlapiGetLineItemCount('purchaseorders');
for (var i = 1; i <= countLine; i++)
{
var poid = nlapiGetLineItemValue('purchaseorders', 'id', i);
var porec = nlapiLoadRecord('purchaseorder', poid);
var podate = porec.getFieldValue('trandate');
var ponum = porec.getFieldValue('tranid');
var poamount = porec.getFieldValue('total');
nlapiLogExecution('DEBUG', 'PO Date', podate);
nlapiLogExecution('DEBUG', 'PO Number', ponum);
nlapiLogExecution('DEBUG', 'PO Amount', poamount);
}
}
No comments:
Post a Comment