Hi,
As part of our solution, we have an application which sends Web Service calls to NAV in order to Clock In/Clock Out Employees.
When an entry is made in the table, we validate the "Event Time" and then calculate an "Amended Time" in the table trigger.
This second time is in essence a rounded time, taking into account grace periods for lateness/overtime.
For example, if I am meant to start work at 7AM, and clock in at 7:04AM, the system will calculate the "Amended Time" as 7AM.
We are seeing some instances, where this is incorrectly being rounded to 7:30AM.
Yet, if I re-validate the field "Event Time" without changing the value...it calculates correctly.
This happens for every example we get.
I have run some scripts to insert say 100 rows into the table (from a codeunit), and error if the time is incorrectly rounded. Which frustratingly passes every time.
I guess my question is, how could this be happening....the value of the field runs through the same logic, with the same value...and comes out with different answers.
Has anyone encountered issues like this before, in relation to Web-Service calls?
0
Answers
The examples which are causing us a problem should exit at this line -
Which is why it is so strange that when I re-validate the field, which calls this code...it does exit correctly at this point.
The XML was passed correctly to the Web Service, but the issue is this line
CREATEDATETIME is adding an hour on the to time which we specify in the variable ExpectedClockInTime.
So this needs to be converted to UTC time.