anyone have an idea why this formular work in the ...
# suitescript
p
anyone have an idea why this formular work in the UI but not in suitescript 2.x ?
["formulanumeric: CASE WHEN TO_DATE({custrecord_absence_employee.custrecord_absence_enddate}, 'dd/mm/yyyy') = TO_DATE(TRUNC(CURRENT_DATE-1), 'dd/mm/yyyy') THEN 1 ELSE 0 END","equalto","1"]
z
@Peter Bertelsen Can you try it like this
Copy code
var formula = [
                        String("formulanumeric: CASE WHEN TO_DATE({custrecord_absence_employee.custrecord_absence_enddate}, 'dd/mm/yyyy') = TO_DATE(TRUNC(CURRENT_DATE-1), 'dd/mm/yyyy') THEN 1 ELSE 0 END"),
                        "equalto",
                        "1"
                    ];
p
thanks, but still failed 😕