Jump 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.

Sending email when record deleted

Featured Replies

I'm trying to send an email (containing information from the deleted record) whenever a record is deleted.

Here's the story. Every record represents an appointment with a professor. Whenever the professor can't make the scheduled appointment, he/she can cancel the appointment. With such cancellation, the student should receive a cancellation email stating that his/her appointment (with all the pertinent details: time, location, date, etc.) was cancelled. The problem: since the record has already been deleted, how to pass along all the record fields to the send email XSL stylesheet?

I use the send_email function to send email:

[...]

An error occured while sending the student an email

A cancelation email was sent to the student.

[...]

The above code sends the email. Nevertheless, since the record has been deleted, nothing is passed in the third argument of the send_email function. I've tried passing $request-query as the third argument, but I'm not sure how to extract that XML node in 'appointment_cancel.xsl'.

Any pointers?

Thanks,

Adrien

p.s. an abbreviated and commented version of 'appointment_cancel.xsl' is included as an attachment.

appointment_cancel.xsl.zip

I'd have to test throughly, but if you delete a record and just display the XML, do you still get the record data? This used to be the case... If so, then you must use the data of the current record in your email.

I second Beverly's comment. The XML data of the deleted record is still kept. Look at the following thread http://fmforums.com/forum/showtopic.php?tid/139914 for an example.

Create an account or sign in to comment

Important Information

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

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.