Applications
Through applications, you can add custom commands to Alvao, add custom tabs to certain pages, automatically perform other custom actions when certain commands are run by users, and so on. In the application templates, you can find examples of ready-made useful applications that you can use right away.
If you are a member of the Administrators or Application Administrators group, you can manage applications in Administration - Applications. For possible extensions available in this module see the list of script templates.
Application programming
Caution:
A poorly defined application can irreversibly damage the Alvao database. Always create and test applications in a test environment with a copy of the production database.
The prerequisite for creating an application is a good knowledge of C# programming,
Alvao.API and Alvao database.
Language localization
Applications can be multilingual and communicate with the user in their preferred language, see the example of a MultilingualCommand.
Sending a message in an automatic action
If you need to send any message as part of an automatic action, use the SendMessage method. If you do not want the sent message to be written to the request log, use the QueueMailMessage method.
Note:
Methods can be used for any type of extension.
Database transactions
If you need to perform Alvao operations in your application, we recommend that you preferably use the prepared Alvao.API methods to do so,
which means you don't have to deal with database connections and transactions.
If you need to access the Alvao database directly in your application, use the ConnectionScope to connect to the database,
which you get by calling the AlvaoContext.GetConnectionScope() method.
The LegacyConnection and LegacyTransaction properties contain a connection and possibly an open transaction that you can use, for example, in an object of class SqlCommand.
You can find an example use case in the CostsCalculation application template.
Note:
Most application methods also accept a database connection and an open transaction as their input parameters, e.g.
ITicketAutoAction.OnticketChanged.
In that case, you can also use the values of these parameters. However, we recommend that you prefer to access them via the
ConnectionScope class.
If an application method is running in an external open transaction and the method ends in an exception, the transaction is automatically canceled.
You can also start your own transaction in the application by calling the ConnectionScope.BeginTransaction() method.
Getting WebApp root URL
If a custom command or a custom tab is to open another ALVAO WebApp page, use the Alvao.API.Common.DbProperty.WebAppUrl property from the Alvao.API to get the root URL of the WebApp.
Did not find what you were looking for? Ask our technical support team.