Jump to content

Help with setting up auto email on field changes


HX_Guy

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

Recommended Posts

Looking for some help in setting up an auto email to specific recipient when a field is modified.

What I'm looking to accomplish is when Sales Rep = X, and any field is modified, send an email to X. Ideally it would also include what field was changed as part of the email content.

Currently I have a single script setup (see attached) that when a rep logs in, it automatically goes to the Sales Rep Access layout, then if Sales Rep = X, it does an automatic find for their name in the Sales Rep field and only displays their accounts.

Screen Shot 2015-08-09 at 12.05.07 PM.jpg

Edited by HX_Guy
Link to comment
Share on other sites

Currently I have a single script setup (see attached) that when a rep logs in, it automatically goes to the Sales Rep Access layout, then if Sales Rep = X, it does an automatic find for their name in the Sales Rep field and only displays their accounts.

 

This can be done a lot easier and more correct by using the built in access privileges. 

Link to comment
Share on other sites

Since you are defining who "Sales Rep" is at the record level, couldn't you just have a relationship based on that field and match field in the Users table. With that I'm place, you could then get the email address via that relationship (theReationship::Email).

The more interesting part to me is the record modification. When would you trigger the email to be sent? You need to think this through rather thoroughly or else you may be generating many emails.

Hope this helps.

Link to comment
Share on other sites

Hi HX_Guy,

Here is a little sample file I zapped up. It uses field mod tracking. It does the following:

ON RECORD LOAD
- stores a list of fields present on the layout in a global
- stores the values of those fields in a global

ON RECORD SAVE
 - stores the current value of the fields

ON LAYOUT
- displays an EMAIL button if there has been a change
- Record Navigation to trap against navigation to another record without sending email

Also, included a REP table to store reps and their email addresses. Established a relationship based on the primary key of the REP. Pulling the name and email address via the relationship. See Send Mail script options.

Tear it apart, learn from it, and adapt it to your solution if it fits.

Good luck!  

mod_alert_email.zip

Link to comment
Share on other sites

This topic is 3151 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.