Skip to content

Create References

Javapackage: com.etendoerp.copilot.devassistant

Overview

The Create References Tool is a tool that creates references in the Etendo Application Dictionary. This tool allows for example the addition of new list references to a specific module within the Etendo database via an HTTP request to a webhook.

It is particularly useful in the development process, enabling system administrators or developers to define new references that can later be utilized in applications. This tool automates the creation of these references, ensuring consistency and adherence to quality standards in the configuration.

Installation

You can install only the module containing the Create References by following the guide on How to install modules in Etendo, looking for the GitHub Package com.etendoerp.copilot.devassistant.

Components

The Create References Assistant is composed of the following component:

  • Create Reference Tool: This tool allows to create references on Etendo and on the database using queries generated with the parameters given in the tool.

Functionality

The Creates References Assistant is designed to facilitate the creation of references, for example, it is possible to create list of references in the Etendo Application Dictionary by providing the assistant the necesary input parameters.

Let's see an example about how the user can interact with the assistant and create the needed references in Etendo.

Usage Example

1. Setup

To use this assistant, it is necessary to log in as System Administrator role and set the module in which the changes will be exported in development.

2. Open Copilot and select Create Reference Assistant

alt text

3. Ask the assistant which reference type you need to create

alt text

User: "Create a list with the current currencies used in all European countries and suggest a name for the reference. The prefix to export this information in the module is copdev.".

Copilot: "Great! Let's start creating the reference list with the currencies used in European countries. Prefix: copdev Reference Name Suggestion: European Currencies. Reference Items: Euro (EUR) British Pound (GBP) Swiss Franc (CHF) Norwegian Krone (NOK) Swedish Krona (SEK) Danish Krone (DKK) Polish Zloty (PLN) Hungarian Forint (HUF) Czech Koruna (CZK) Bulgarian Lev (BGN) Romanian Leu (RON) Croatian Kuna (HRK) (Note: Replaced by Euro in 2023 but might be useful historically) Serbian Dinar (RSD) Turkish Lira (TRY) Russian Ruble (RUB) Do you want to provide the list of currencies yourself, or should we go with this list? Additionally, would you like me to infer the description and help text, or do you want to provide them? Here's what I suggest: Description:List of currencies currently used in various European countries. Help: Select the appropriate currency from the list that represents the currencies used in Europe.Is this okay with you?"

4. Receiving the results

The Create References Tool will process these parameters, verify the access token, build the request body and call the Etendo webhook to create the reference.

In the Reference window, Etendo shows all the fields with the corresponding information generated and in the List Reference tab, it is possible to see the new list reference created.

alt text

5. Export the changes

Once the development is validated by the developer, and the necessary manual modifications are made, it is possible to export the changes in the corresponding module.

Terminal
./gradlew export.database --info