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.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Problem with searching a custom record
Hi Guys
Im having a few problems with what i thought would be a basic custom record search.
I have a custom record - customrecordfhl_rentals.
I am trying to search using the following code:
var filters = new Array(); filters[0] = new nlobjSearchFilter( 'custrecordfhl_rentalid', null, 'equalTo', '2271200793419' ); var columns = new Array(); columns[0] = new nlobjSearchColumn( 'custrecordfhl_rentalitem' ); columns[1] = new nlobjSearchColumn( 'custrecordfhl_rentalcustomer' ); columns[2] = new nlobjSearchColumn( 'custrecordfhl_rentalbookdate' ); columns[3] = new nlobjSearchColumn( 'custrecordfhl_rentalquote' ); var searchresults = nlapiSearchRecord( 'customrecordfhl_rentals', null, filters, columns ); for ( var i = 0; searchresults != null && i < searchresults.length; i++ ) { var searchresult = searchresults[ i ]; var record = searchresult.getId( ); var rectype = searchresult.getRecordType( ); var cust = searchresult.getValue( 'custrecordfhl_rentalcustomer' ); var book = searchresult.getValue( 'custrecordfhl_rentalbookdate' ); var item = 0