Embedded Extensions in Table Documents

Documentazione •
In questo articolo

Banana Accounting allows to use extensions that are embedded within a Banana File.

Embedded Extensions are Extensions files and saved directly in the Banana Accounting file.

These extensions must be saved in the Documents table of the file, and work only in that specific file. There is no need to install them; once created, embedded extensions are immediately ready to be used.

To run the embedded extensions, you can easily do so from both the Documents table and the Extensions menu.

How to create an embedded extension

The following steps show how to create and use an embedded extension:

  • Add the Documents table.
    If it's not already present you need to add the Documents table in the Banana accounting file with the menu command Tools > Add new features > Add document table.
  • Add the Javascript file.
    In the Documents table you can now add your embedded extension.
    • In the ID column enter the file name.
    • In the Description column enter a comment (optional).
    • In the Attachments column, double click on the cell or select the edit symbol in the top right corner, then select Javascript code and confirm with OK.

      banana embedded extension javascript
       
  • Write the Javascript code of your extension.
    An editor will open in which you can write the code. When you are finished, confirm with OK. You can edit the code at any time by reopening the editor.

    banana javascript embedded extension
     
  • Save the accounting file.
    When you save the accounting file, the extension is also saved. You can run or edit it whenever you want.

Run a general embedded extension

There are two ways to run an embedded extension:

  • Click the run symbol in the Attachments cell where your code is located.
  • From the Extensions menu, select the extension you want to run.
banana javascript embedded extension

Execute Import, Layout or Customer Report Extensions

Once you have added the embedded extension you can choose the extension in: 

  • Accounting Import
  • Print Invoice
  • Print Customer Reminder 
  • Print Customer Statement

Useful resources

We have prepared Tutorial files for embedded Extensions that include samples code for most API. You can see how the API works and experiment with it.

 

 

Aiutaci a migliorare la documentazione

Sono benvenuti suggerimenti per come migliorare questa pagina.

Informaci quale tema necessita di una spiegazione migliore o come chiarire meglio un argomento.

Condividi questo articolo: Twitter | Facebook | LinkedIn | Email