Form - Email sending to the person logging the record

From All n One's bxp software Wixi

Jump to: navigation, search

1 Overview

Sometimes it can be useful to send an email to the person logging the record. This can be easily achieved through a little bit of system tweaking.

2 Setup

2.1 Who to send to

Firstly you need to ensure a proper address is set on every user in the system. This is the easiest way to manage the recipients email address.

2.2 The field to send to

Next in the form we add a field which will hold the email address. Simply add a question, then set its initial visibility to false. i.e. Add a question and hide it.

Set the field mapping of the field added. Call it "Email Logger" or something similarly unique.

For this explanation we'll imagine the field is strCDA_1_field_0_33

2.3 Some JavaScript on load

Next we're going to set up getting the data into the field.

In the JavaScript on load.

if (document.getElementById('strCDA_1_field_0_33')){
  if (document.getElementById('strCDA_1_field_0_33').value = ''){
    document.getElementById('strCDA_1_field_0_33').value = document.getElementById('strCurrentUser_Email').value;
  • If the field is on the page.
  • If the field is empty
  • Copy the email address of the currently logged in user into the field

The means when the record is first logged, the email of the user logging it will be put into the email field.

2.4 Set up the outcome

Finally we set the outcome. On the External Email field, in the To box, choose from the drop down list the field you added and hid.

2.5 Test it

Log a record and see the email send.

3 Conclusion

So that's it. Really easy to send a copy email to the logger of the record.