Unpredictable exception comparing date fields
I have a bit of code that seems so simple in my brain, but is throwing an unpredictable exception (well, technically it is throwing and 'UnPredicable' exception lol).
if(invoice.get("Payment_Date") > person.get("Last_Payment_Date") || isNull(person.get("Last_Payment_Date")) = true)
{
update = zoho.crm.updateRecord("People",personid,{"Last_Payment_Date":invoice.get("Payment_Date")});
}
The fields exist, the API names are all correct, the comparison is definitely a date field with a date field. Anybody know what is going on?
Thanks
Matt