Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Auto email whenever new record is created

Featured Replies

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

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.

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.

  • Author

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

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.