Hi,
There seems to be a problem with ```
databaseManager.saveData()
var vRecord = arguments[0];
var vTable = ‘sales_rep_line_items’;
var vFoundsetRel = databaseManager.getFoundSet(currentcontroller.getServerName(),vTable);
vFoundsetRel.find();
vFoundsetRel.quotesid = vRecord.quotesid;
var vCount = vFoundsetRel.search();
saveData returns a boolean value. Try setting this to a variable and see if you are getting a true or false value. If you are getting a false value, then there is something not allowing the save to continue.
because if it is a DATETIME column your are putting a string in it, which does not work, because you do: var vDateString = utils.dateFormat(vRecord.invoice_date,‘yyyy/MM/dd 00:00:00’);
that could be the reason, that it is not saved?
UPDATE: I just see that you convert it back to datetime object…
Maybe comment out, 2 of the 3 update lines
Hi Harjo,
Thanks for the reply, I posted the second method as a solution to my problem as it seems to work reliably. But I am not sure why databaseManager.saveData(); does not behaive in the same way as fsUpdater.performUpdate(); both should force a update statement to the database, but in my method only fsUpdater.performUpdate(); does. The reason I am processing the dates this way is to set the time component to 00:00:00 it seems a bit messy but maybe you could suggest a cleaner way ??
var vDateString = utils.dateFormat(vRecord.invoice_date,'yyyy/MM/dd 00:00:00');
var vFormDate = new Date(vDateString);