Anvaigo Mobile App / Customize the User Interface / App Process Definition by Anvaigo Script

App Process Definition by Anvaigo Script

What is Anvaigo Script?

You can use Anvaigo Script to customize the user interface of the client and the business logic for the Anvaigo Mobile App. These scripts can be used for individual table relations and actions. Anvaigo Script is based on the Lua scripting language and provides functions that are similar on names and the syntax of C/AL commands in Dynamics.

Where to define Anvaigo Script?

In an Action Code, you can access and edit the Anvaigo Script using the function ”Script”. On the Form/Page of Anvaigo Script on top you see the source code of the script, below are the libraries.

Organize Your Code Using Libraries

Libraries are actions of type ”Library”, which provide functions and can be used by your Anvaigo Script. So you can use a function in a series of actions, without having to program them every time again.

For a complete list of all commands that are available in Anvaigo Script, see our Anvaigo Script Documentation.

Table Triggers

Along with actions and individual table relations you can replicate the functionality of table triggers in Anvaigo Script. This makes it possible to replicate the Dynamics business logic very detailed. You can use the trigger of the Anvaigo Client Suite ”OnInsert”, ”OnModify”, ”OnDelete”, ”OnRename” and ”OnValidate”. All triggers are invoked exactly as their equivalent to Dynamics.

The assignment of Anvaigo Script to a table trigger is done in the setup of the Anvaigo Client Suite in ”Mobile. In Anvaigo Script you can call the table trigger using the table functions ”INSERT(TRUE)” and so on – just like in Dynamics.

External Editor (Optional)

You can edit Anvaigo Script directly in your Web, Windows or Classic Client of Dynamics. A special developer license from Microsoft or Microsoft Visual Studio is not required.

You will not need any additional software to edit Anvaigo script, but the internal editor does not offer any syntax checks. This is why we offer to edit Anvaigo Script via an external editor like Visual Studio Code, ZeroBrane or Notepad++.

Simply set up path and filename of your external editor in ”Anvaigo in the  ”Mobile. If you work with more than one developer on the same project, folder + filename must be identical for all users. If the external editor cannot be found on a system, we will still open the internal editor as a fall-back automatically.

Simply press save in your external editor and the updated action code will be imported into Dynamics automatically. It is requried to keep your Web or Windows Client open all the time. If you close the Windows Client, you have to re-open your action codes in the external editor through the Web or Windows Client again to reactivate the automatic import.