3 Replies Latest reply on Mar 8, 2016 8:18 PM by evanpan

    How would I write a script to send a notification based on date?

    ryanmead83

      I know I'd need to use a server side script for this but confused how I'd write it.  I have a table with a date field on it for contract renewal that for simplicity sake, I want to send an email when that date is today.

       

      Logically it would be, If ContractEndDate = Today, Then Send Email.

       

      I'm just confused though how a script on the server would trigger that though since normally they would go against the currently open record?  Or would I do this with the Loop command, have the script run at midnight daily for example, and then have it do a perform find where ContractEndDate = Today, and then loop through the find results, sending an email notification with each loop?  Emailing it to me as a report is easier, but assuming I want a separate email all the time (as I'll be using this type of action for other fields as well), just wondering the best way to do that.