Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
problem with getValue()
Hi All,
I am using a function to retrieve a value from searchresults using getValue() function. But it is returning null value. My script is as below:
searchresults = nlapiSearchRecord('customrecord239',null,filters,null); var items_retrieved = searchresults.getValue('custrecord_select_an_item_new'); alert(items_retrieved);//returning null valueIf I use getFieldValue in the records loaded, it is working fine.
searchresults = nlapiSearchRecord('customrecord239',null,filters,null); for(var i=0 ; searchresults!=null && i<searchresults.length ; i++) { var master_item_loaded = nlapiLoadRecord(searchresults[i].getRecordType(),searchresults[i].getId()); var master_items = master_item_loaded.getFieldValue('custrecord_select_an_item_new'); alert(master_items);//returning correct value } 0