Hello,
I am trying to use the setFieldValue method in a formula(date) field, like this :
rbv_api.setFieldValue("klant", {!id}, "End_of_contract", date );
Howerver, it doesn't work. Is it not possible to use this method in a formula, or am I doing something else wrong?
Regards
Matman
Hi ,
In Formula Field instead of setFieldvalue , please use 'return ' statement and choose return type as date or date/time .
eg: var d = new Date(rbv_api.getCurrentDate());
return d;
Oh sorry I don't think I was clear. With this setFieldValue I want to set the value of an other field, not the formula(date) field but just a plain date. I do this because I wan't to sort records based on the results. But when using a formula field, you can't sort. And when using a formula field, it wont update correctly because caluclations are made based on data from antother object.
Possible in triggers with "after create" or "after update" timing.
Hello,
You can create an object script with a rbv_api.setFieldValue() method inside or just use an update field trigger.
Thank you,
Gian