HI
Im currently trying to resolve an issue where I cant get a value from a suitelet from a savedsearch within Netsuite.
var _searchId = 'customsearch_pm_item_record_loader'; //itemFilters.push(new nlobjSearchFilter('displayName',null, 'contains', _searchTerm )); // var rs = nlapiSearchRecord('item', _searchId, itemFilters,columns); for ( var i = 0; rs != null && i < rs.length; i++) { var rowObj = {}; rowObj.id = rs[i].getValue('internalid'); rowObj.custitem_dwr_co_dis = rs[i].getValue('custitem_dwr_co_dis'); rowObj.salesdescription = rs[i].getValue('salesdescription'); rowObj.displayName = rs[i].getValue('displayName'); rowObj.itemid = rs[i].getValue('itemid'); rowObj.unitPrice = rs[i].getValue('unitprice', 'pricing'); // unit price rowObj.basePrice = rs[i].getValue('baseprice'); rowObj.productImage = rs[i].getText('custitem50'); retObj.push(rowObj); } var _jsonString = JSON.stringify(rs); The saved search is returning
"unitprice": 12.6, "salesdescription": "cheap item", "custrecord_pm_record_name": { "internalid": 2, "name": "test item" }
I cant seem to figure out how to use getValue() on the custom fields that are returned, these fields are returned from a savedsearch on a custom record, but I cant work out if i have to use a join, when the data is already there or use a specific function to get into the custrecord_pm_record_name array. any help greatly appreciated