var fields = [
{
id: 'custrecord_es_app_date_submitted',
changed: function() {
return (oldRecord.getValue(this.id) != newRecord.getValue(this.id));
},
constraints: [
{
fails: function() {
log.debug('debug',this.toString() + ' : ' + this.id);
return (newRecord.getValue(this.id).valueOf() != new Date(new Date().setHours(0,0,0,0)).valueOf());
}
}
]
}
];