Description
An error occurred in the script while running the suite let page after adding the date filters to get the results.


SOLUTION:
Use N/format module
*** Get the custom date using the data type Value ***
var fromDateRecValue = context.currentRecord.getValue({
fieldId: 'custpage_fromdate'
});
*** Change the value to date format ***
var fromDateRec = format.format({
value: fromDateRecValue,
type: format.Type.DATE
});