script to compare a date field with current date
Hi i would like some help in creating a script that would compare a certain date field with the date today. if date is more than 1 year from today it would update a single line field.
Thank you for reaching out! As Application scripts are outside of the scope of general Support, we would not be able to assist with writing specific script logic, that said, generally, you could create an After Insert or an After Update Application Script, and then compare the Date field mentioned to the "Updated" date field of the record through an "if" statement. If the condition is met, you could then stamp a value using currentValues["Single Line field"]="Specified text" general syntax. I am also linking our TrackVia Developer page on Application Scripts below, specifically the "Working with Dates" function library, and stamping values into specific fields:
If you have any additional questions, please do not hesitate to reach out to firstname.lastname@example.org or call in to our Support line directly at 1 (800) 673 3302, we are happy to assist! Our Hours of Operation are Monday through Friday, 7:00 AM - 6:00 PM MST.