Hi, does anyone know how I can compare two date fields, select the newest of the two and populate a third date field in CRM using JavaScript?
*This post is locked for comments
Hi, does anyone know how I can compare two date fields, select the newest of the two and populate a third date field in CRM using JavaScript?
*This post is locked for comments
Hi Graeme, check this,
dynamicscrmguru.com/.../how-to-compare-dates-using-javascript
For clarity, are you trying to update the third date field with the later of the two dates? If so, you could achieve this using business rules:
IF
Date A > Date B
THEN
Set Date C = Date A
OTHERWISE
IF
Date B > Date A
THEN
Set Date C = Date B
See below:
Hi Graeme ,
you can definitely compare two dates using > or < operators.
have a look : stackoverflow.com/.../compare-two-dates-with-javascript
you can compare if (a>b)
a will the newest one.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156