Events are the fragments of C# or VB.NET code executed before or after record was added, edited, deleted, when new user registers etc. Therefore events allow you to define some actions that will be activated when certain conditions are met.
Here are a few examples of some common events:
•send an email which contains the data from a new record, or shows changes to an existing record;
•save data in another table;
•check record uniqueness;
•show related to current record info.
Add an event
1. Go to the Events page.
2. Select an event from the tree in the left pane. To show events with the actual code only, click the button. To filter events by the event name, use text field under the events tree.
After you selected the event, on the right pane you will see definition of the function that implements selected event and description of the function parameters. To hide the parameters description click button.
3. Add your own code or click button to choose one of the predefined actions. More info about predefined actions and sample events with code snippets. Read what common parameters you can use in the events.
Event editor's toolbar description:
4. Choose one of the predefined actions.
5. Modify sample event code by putting the correct values instead of the values colored in red.
Example: in the sample code below insert:
•email address instead of "email@example.com";
•email subject instead of "Sample subject";
•email message instead of "Hello there" and "Best regards".
Note: You can add several actions to the event.
To edit the event, select event from the tree and modify event code. To delete the event, select event from the tree and click button.
You can track all changes made in Event Editor, review and restore any revision. To see revision history, click Revisions button.
Click Show changes at the bottom of revision panel to see changes between current and previous revisions. To restore any revision, select that revision and click Restore revision.
Intellisense is a convenient way to access the functions' descriptions and variables. The Events Editor recognizes the functions and variables and will pop up the function description or the list of available variables to choose from.
Here are a few examples:
Data Access Layer, database field names