Results 1 to 2 of 2

Thread: Send Email when new Record is Created

  1. #1
    crmnovice is offline Senior Member
    Join Date
    May 2009
    Posts
    25

    Default Send Email when new Record is Created

    Hello,

    We would like to be able to send an email message whenever a "new" record is created. I have used the after_save logic hook to successfully send an email. Though, this always fires whenever a record is updated.

    We only want to send the email when a "new" record is created.

    Does anyone know how to accomplish this?

    Thank you!

  2. #2
    crmnovice is offline Senior Member
    Join Date
    May 2009
    Posts
    25

    Default Re: Send Email when new Record is Created

    After further research, I found a very creative solution to this challenge posted by Angel, here:

    http://www.sugarcrm.com/forums/showt...l+custom+field

    The solution is to create a custom field with a flag. In my case the custom field (new_record_email_sent) is set to "No" when the record is created, and set to "Yes" while the after_save logic hook runs. Thus, the email is only sent once!

    Last edited by crmnovice; 2010-05-30 at 03:56 AM. Reason: typo

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. audit newly created record
    By sidh211 in forum Developer Help
    Replies: 3
    Last Post: 2012-02-27, 12:08 PM
  2. Soap Record/send email
    By mlh in forum Developer Help
    Replies: 5
    Last Post: 2010-12-29, 04:53 AM
  3. How-to send automatically email to a just-created account?
    By jaigleCRM in forum Customer Support
    Replies: 2
    Last Post: 2009-07-31, 10:37 AM
  4. Send email to Contact when a Case is created
    By MichaelRLevy in forum Help
    Replies: 1
    Last Post: 2007-09-27, 10:13 PM
  5. How does a new record for any module get created??
    By Arpan_Biswas in forum Developer Help
    Replies: 1
    Last Post: 2006-02-08, 05:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •