Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
Help with script
Hi,
Can anyone tell me what I am doing wrong with the following script:
var newRecord = nlapiGetNewRecord();
var filters = new Array();
for ( i = 1 ; i <= newRecord.getLineItemCount('item'); i++ ) {
var itemID = newRecord.getLineItemValue('item','item',i);
filters[0] = new nlobjSearchFilter('internalid',null,'equalTo',itemID,null);
var columns = new Array();
columns[0] = new nlobjSearchColumn('displayname');
columns[1] = new nlobjSearchColumn('featureddescription');
var searchresults = nlapiSearchRecord('inventoryitem',null,filters,columns);
var item_name = searchresults[0].getValue('displayname');
var description = searchresults[0].getValue('featureddescription');
var itemRecord = nlapiLoadRecord('inventoryitem',itemID);
nlapiLogExecutionNote('DEBUG','itemID='+itemID);
nlapiLogExecutionNote('DEBUG','itemRecord='+itemRecord);
nlapiLogExecutionNote('DEBUG','itemName='+item_name);
nlapiLogExecutionNote('DEBUG','description='+description);