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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Uncover the power of data with the Analytics Hub —your ultimate guide to mastering NetSuite Saved Searches and Reports. Simplify the complex and unlock your organization's true potential. Dive into the Analytics Hub now and soar to new heights!
To help you get the most out of your 2025.2 Release Preview account, review the topics outlined in the 2025.2 Release Preview Guide.
Nominate Your Peers for NetSuite Support Community's Choice of the Quarter! Submit your nomination today.
Intelligent Payment Automation version 1.0.3 is now available in the SuiteApp Marketplace. The SuiteApp, powered by BILL, lets you automate payments, manage vendor details, and bank account information within NetSuite. Learn more
No Limits. Just possibilities.
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Activity search Error
Hi Guys,
I have a Scheduled SuiteScript that runs fine and I am now trying to add a function that returns the number of events attached to the lead, and I am getting the following debug + Error.
I have run the search in the UI and it returns 1 record. Any ideas?
function GetNumberofEvents(customerName) { // Build Criteria for Search var filters = new Array(); filters[0] = new nlobjSearchFilter('type', null, 'anyof', 'event'); filters[1] = new nlobjSearchFilter('company', null, 'anyof', customerName); // Return results from the Search var results = new Array(); results[0] = new nlobjSearchColumn('title'); nlapiLogExecution('DEBUG', 'Before act Search', 'customerID:' + customerName); // Execute the search var numberOfEvents = nlapiSearchRecord('activity', null, filters, results); if(numberOfEvents == null) { nlapiLogExecution('DEBUG', 'after act Search', 'number of events ' + 0); return 0; } else { nlapiLogExecution('DEBUG', 'after act Search', 'number of events ' + numberOfEvents); return parseInt(numberOfEvents); } } 0