cancel
Showing results for 
Search instead for 
Did you mean: 

created != modified for newly created objects?

hu2hugo
Champ in-the-making
Champ in-the-making
I want to check whether an object has been changed since its creation. When I create a cm:cmobject with the mandatory cm:auditable aspect, cm:created and cm:modified differ with a few milliseconds. I currently check for a difference of 1 second (<#if (dateCompare(comment.properties["cm:created"], comment.properties["cm:modified"], 1000) == 0)>) but it feels rather hacky.

Is there a better way to check for modifications without using cm:versionable?
Marc
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
That's the correct way at the moment - and in fact, is the same method we use in the summary page of the new Projects space in v2.9.

Thanks,
Mike

hu2hugo
Champ in-the-making
Champ in-the-making
Thanks for this prompt reply!
Marc