Check out Oracle NetSuite upcoming events and conferences here
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.
Don't miss out on our Pop Quiz # 1, You only have until April 23, 2024, 4:30 PM ET to comment your answers and earn rewards! Click here for more details.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Community Poll: What sort of content would you like to see more of?

Script search by hour?

edited Dec 2, 2019 5:57PM in SuiteCloud / Customization 3 comments

I'd like to run a search that checks if a record was created within the last hour.  I know I can create a saved search to accomplish this using 'created' after today, relative 1 hours ago.

Is there a way to script this instead?  I tried this but it returns null.

var dateOneHourAgo = new Date();   dateOneHourAgo.setHours(dateOneHourAgo.getHours()-1); // Set date 1 hour in the past      var filters = new Array();   filters[0] = new nlobjSearchFilter('created', null, 'after', dateOneHourAgo);

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!


Community Whiz

Quarter 2 (Apr-Jun 2024)

This Week's Leaders

This Month's Leaders

All Time Leaders