Is this a calculation script? If so, replace field.value with event.value ...
What is the "field" object?
What happen when you use "event" for the object and not "field"?
Even if this script is placed at the document level or any other location, it is still a calculation. It just not a field Custom Calculation Script. You are adding one value to another to get a new value.
It is not a calculated script, so I can't use the event object. The "field" should be read as: this.getField("FieldName").value = new Date(futureInMilliseconds);.
Well, in the end we opted for not having the functionality, so it's no longer an issue for me, still an issue that it's not working as it should though...
You have to refer to the object.
this.getField("FieldName").value = new Date(futureInMilliseconds);.
Where did you place this script?