I want your help to get Server Date and Time when action is performed. e.g. Submit, Approve, Reject etc
var myDoc:NotesDocument = data_source.getDocument().
I have tried following but failed to get server time this always stores client date and time specially when its executed on client.
myDoc.replaceItemValue("ApprovedOn", session.createDateTime(@Now());
following generates error / exceptions.
myDoc.replaceItemValue("ApprovedOn", @Now());
OR
var curr_Date = @Now();
myDoc.replaceItemValue("ApprovedOn", curr_Date);
OR
var mDt:NotesDateTime = session.createDateTime(@Now());
myDoc.replaceItemValue("ApprovedOn", mDt.toJavaDate());
Error while executing JavaScript action expression
Script interpreter error, line=168, col=17: [TypeError] Exception occurred calling method NotesDocument.replaceItemValue(string, Date) null
Please guide me how can I store current server date in a date and time field when any action is performed. Thanks for your time and efforts.