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 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