How to execute SQL code in action

This tutorial shows you how to execute SQL code in action component. In our example we will use SQL code in action to insert new promotion in our database.

Action sql

1. Login into developer panel of application.

2. Click on Pages menu item.

3. Select page pagePromotions.

4. Drag and drop Action component from all components list to button for registration named ButtonSaveNewPromotions.

Action with SQL

5. In dropped action component properties, for Action type property choose SQL Code. Click on Action code text field and enter your SQL code. Click on Save button.

Action sql code

6. Click on Save changes, go into your application and check out the results.