Caution: Be careful with AJAX calls and redirecting! It took me a
while to figure out why some customers were being emailed multiple times
until I finally figured out the steps to reproduce the problem.
For example - On a detail (show) form, I would click a button to email
them a document. This would invoke an ajax remote call and update the
UI with the status. Then, I would go and create an activity (from the
show form). In the normal course of events, after an activity is
created, I want to redirect back to the show form. In this case, since
the email was just sent, that was the last action before the activity
creation. Thus, the redirect back launched the ajax call again instead
of doing what I wanted - which is showing the form.
This was somewhat transparent in that the show form still came up! Just
an FYI for anyone who may be experiencing anything like it.
Regards,
Michael