I have been trying to create a simple on screen message if the expired date of a Warranty is less than the current date by applying the following script into the custom content of a custom machine entity but it doesn't appear to work. Any advice on where I am going wrong would be greatly appreciated.
<script>
crm.ready(function()
{
var warrantyexpired = new Date(mach_warrantyexpireddate);
var dNow = new Date();
if(warrantyexpired
{
crm.infoMessage('Machine's Warranty has Expired');
}
})
</script>
Thanks