Discussions
Streamline Invoice Processing with AI-Powered Automation
Use AI-Driven Insights for Faster, Better Planning and Forecasting
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