Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi,

Does anyone know how I can go about writing a script that sends an automated email to someone everytime a new record is created. Context: The person who prints the membership cards wants an alert on new members to know when to print the cards.

Thanks,

David

Posted

Set up your database so that users can only create new records using a scripted button such as the following:

Set Error Capture [on]

Allow User Abort [off]

New Record/Request

Pause/Resuem Script [indefinitely]

Commit records/Request [no dialog]

Send Mail [no dialog;

To:"[email protected]"

Subject: "New Customer Added "&Docs::Name

Message: "New customer named " & Docs::Name & "with ID " & Docs::PrimeDocID & " has been added by " & Docs::CreatedBy & " at " & Docs::Timestamp ]

The reason I pause the script is to allow the user to input the data then send an email with pertinent info. Also, although the email is set to send without dialog, the user will still be prompted that Filemaker is trying to send out an email.

Posted

The above example will work but it isn't foolproof. FileMaker is not capable of sending an email message on its own so it uses the default email client application to send the email. On Windows machines this is often Outlook or Outlook Express. Later versions of Outlook will not let another application send a message on its behalf unless the user specifically authorizes the action by clicking a button on a popup window. This can present a problem in a situation like yours. Since the user may not be expecting to send an email as part of the signup process they may just cancel or not allow the message to be sent.

The best way around this is to use an SMTP plugin for FileMaker which will give you full control over the emailing process from within FileMaker.

I use this method frequently in situations like you describe. This is called work flow management. Using the SMTPit plugin, I am able to have the messages sent without the user's knowledge at all.

Posted

SMTPit is already installed on the system to facilitate communciations with the membership base. How do I combine this with the script that Breezer showed in the previous post?

Thanks,

David

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