Jump to content

Trigger a Script from a Field Change.


This topic is 2053 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have been stumped on how to have a script trigger when a field has changed. I want the script to be able to trigger without a user entering or leaving a field (meaning it should work with the database unattended).

 

Here is the scenario: When a date in a date field equals today a script is triggered to send an email.

 

Seems like it should be pretty simple, but I have not found a solution yet. Set Script Triggers will not work because it requires a user to exit the field for the script to run.

 

Thanks in Advance for your Help - Sam

Link to post
Share on other sites

How is the field changed then if the user does not do it?

 

If it is part of a scripted workflow, let the script take care of the email sending.  You definitely do not want triggers for this.  Triggers are for handling user-level events and in your case you don't have one to handle.

 

An alternate approach would be to create a server-side script to find updated records and loop through them and send the email.  Then put that on a schedule.

Link to post
Share on other sites

 want that end date to automatically trigger a script that sends an email 

 

But how?  A trigger is based on an event that the user does.

 

It sounds like all you need is a nightly server-side schedule that does a find and loops through the found set to send an email.

Link to post
Share on other sites

This topic is 2053 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.