You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Datetime field Comparison

Received Response
edited Jan 19, 2021 2:09PM in Sales 2 comments


I am trying to compare 2 standard date fields (CreationDate and LastUpdateDate) from the Service Request object  to verify if one specific field from Service Request object has been updated  two (2) hours after the creation  of the Service Request. I have implemented this comparison in a trigger object inside the Service Request object.

In this case I am trying to compare the  2 standard date fields (CreationDate and LastUpdateDate) from the Service Request object  to verify the standard Status field from the Service Request has been updated 2 hours or more after the creation of the Service Request.

 I am trying to use the function compareTo(CreationDate, LastUpdateDate), but I receive this error message when my trigger runs:


Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!