Choose to send email after updating a record

Choose to send email after updating a record

How to allow the user to send an email after updating a record if they so chooses.

Sometimes you want to send an email only under certain circumstances after updating a record.

To do that follow the following procedure.

  • Create your Custom Form or NeXTensio form as usual.
  • Add a "Checkbox" next to the buttons at the bottom of the page using the following values:
<input name="mail" type="checkbox" id="mail" value="1">
  • Add your "Send Mail" behaviour
  • Under the "Advanced Tab" select the transactions you want this email to be sent;
  • Insert, Update or delete, Give it a high priority and of type "AFTER"

Click each transaction in turn In the condition field and enter the following for every transaction type:

{POST.mail} == "1"
  • Click OK

When the user wants to send an email he/she then needs to tick the checkbox.
The script checks if the value of the checkbox called "mail" is set to "1"

If it is set, the send mail SB will execute and the email will be sent.

Written by:  - 30 Jul, 2010