When a custom record is created, the created date ...
# suitescript
s
When a custom record is created, the created date is set, and the last modified date sometimes matches the date created and other times there is an offset between the two even when the record has not been modified. Has anyone else seen this? I am trying to distinguish between records that were created today and those that were updated today. I didn't really want to search the script notes records, because I expected last modified to match the created date if it hadn't been modified. This is just a guess, but I am imagining the last modified date is a timestamp related to when the call to save the record is returned? Anyhow, it is frustrating.
m
Could this be caused by editing the record and saving without making changes?
s
Doubtful, because it’s being called via an API, but it’s possible..
I tried rounding to the minute and this reduced the noise, but it’s weird man~
I have a beforeSubmit UE running, and that’s it.
This is the decimal difference between ‘lastmodified’ and ‘created’:
0.000011574074074074074074074074074074074
so the criteria for ‘created’ is:
({lastmodified}-{created}) <= 0.000011574074074074074074074074074074074
e
There's a
version
field, looks undocumented though
👍🏼 1
s
Timestamps on the records are HHMMSS The native DateTime Fields are higher precision and the lastmodified date does get updated when the record is saved without changes. I see about 10% of my 6,000 records have different updated dates, so I have to assume ‘something’ happened to change the timestamp because so many of the records have matching modified/created timestamps.