Discussions
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.
Scripting and date filters
I'm trying to use the date filter in a script. When I do the read the script just stops, doesn't even throw an error. Has any one used date filter in a read in a script? Here is my code:
function setTimeOffRequestSwitch ()
{
try
{
// check the bookings for this user.
var newr = NSOA.form.getNewRecord();
var userid = newr.userid;
var startdate = convertToDate(newr.startdate);
var enddate = convertToDate(newr.enddate);
var booking = new NSOA.record.oaBooking();
booking.userid = userid;
var bookingObjsArray = [];
bookingObjsArray.push(booking);
bookingObjsArray.push(startdate);
bookingObjsArray.push(startdate);
NSOA.meta.alert("start and end " + startdate + " " + enddate + " id " + userid);
// Define the read request