Embedded Extensions in Table Documents

文件资料 •
在此文中

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

Embedded Extensions are extensions written in JavaScript 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 an 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

 

Useful resources

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

 

Tell us how we can help you better
If the information on this page is not what you're looking for, is not clear enough, or is not up-to-date, let us know.

分享这篇文章: Twitter | Facebook | LinkedIn | Email