i want to get the estimate # and load it to another form by script.
i used the API of nlapiLoadRecord(type, id, initializeValues) and the getFieldText(name) and getLineItemField(group, fldnam, linenum) inorder to get the information i want.
What i want to get is to get the Estimate number, the date of Estimated, some custom body field in the Estimate, Items name in the Estimate, and some custom column fields in the Estimate
here is some of my script
function printQuotationPic(request, response)
{
var recId = request.getParameter('id');
var recEST = nlapiLoadRecord('estimate',recId);
itemname = recEST.getLineItemText('item','item',1);
itemproductionprice = recEST.getLineItemText('item','custcolprodprice',1);
estNumber = recEST.getFieldText('tranid');
factoryName = recEST.getFieldText('custbodyfactoryname');
depar = recEST.getFieldText('department');
salesrep = recEST.getFieldText('salesrep');
}
in my script, i can get the Item Name, Department and Sales Rep. But all the others show an null.
How can i get the correct fldnam(getLineItemField(group, fldnam, linenum)) and name(getFieldText(name)) which can be use in my script.
i can get the internal ID of those fileds in here, https://system.netsuite.com/help/helpcenter/en_US/RecordsBrowser/2011_2/index.html
but those internal id cannot be apply to the fldnam and name.
please help.