Skip Navigation LinksALVAO 11.2 / Extension modules / ALVAO Asset Management Custom Apps / Applications
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 ticket 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 ConnectionScope object has the Connection
property which contains several methods for querying and modifying the database
(see Dapper documentation).
You can find an example use case in the TicketCostsCalculation 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 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.
Sending a MS Teams notification in an automatic action
If you need to send notifications to MS Teams using Alvao Bot as part of an automatic action, use the Send method.
Did not find what you were looking for? Ask our technical support team.