Discussions
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
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