update time when record is opened

  • 0
  • 1
  • Question
  • Updated 6 years ago
  • Answered
We need to measure the time it takes to work a record so what we need is a field to automatically post the time when the record is opened. THe end time is achieved becuase it is date modified. Any way to do this?
Photo of Ken0345


  • 0 Points

Posted 6 years ago

  • 0
  • 1
Photo of Mark_Shnier


  • 700 Points 500 badge 2x thumb
The way I would do this if it was a real need would be to have the form open up in a form with almost no data on it. Then I would create a formula URL button on that almost empty form to update a field called [date/time opened] with the current now(0 date time and re-display the record in edit mode on the real form.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,434 Points 20k badge 2x thumb
Add the [start] date to the form and through a form rule hide it. Then use the following code with the image onload technique to insert the the local date/time into the field the hidden field:

$("#_fid_6").val(new Date().toLocaleString());