Entry points

Entry points enable a specific or vertical process to interact with standard processes in sequences where no user interaction is available. Entry points are defined on request by the standard code developers. Usually, "black box scripts" (such as price determination or automated generation of documents based on other documents) have entry points.

Technically, an entry point is an optional hook that calls a specific or vertical script, in a documented context.

As long as an entry has not been added in an entry point routing table, nothing is done.

Entry points are created on request to allow our partners to integrate vertical or specific behaviors in the standard.
Every entry point is documented in order to define the complete context of the call to the specific/custom process.

The entry points table is delivered empty by Sage. It must therefore be loaded as and when required (this can be done by patch).

Every entry point script has a sub-programme $ACTION, and receives an ACTION variable that defines more in detail the entry point used.

The code of the vertical or specific script:

$ACTIONCase ACTIONWhen "..."...EndcaseReturn

The entry point defines the assignments of one or more specific or vertical scripts to a standard script that calls one or several hooks. Every hook is identified by a code that is assigned in the ACTION variable. For instance, the VAT declaration script (DCLVAT) in the ERP field has seven entry points identified by the following ACTION values:

Additionally, the entry point tables can be used to associate create scripts with objects. This replaces the vertical script present in the object dictionary until version 7.1, and it enables several entry points for a given object. In this case, ACTION contains the object event code.

An example of ACTION values:
* If ACTION="RAZCRE", a new record will be created in object management.
* If ACTION="APRES_MODIF", all modifications have been done in the masks and an update is requested.
* ...

This kind of hook on objects is of course usable only in version 6 style code (running in classic pages). In version 7 code, the association to scripts with classes or representations is done in the corresponding dictionaries; several vertical, specific, and standard scripts can be associated with a class or a representation and the execution order can be freely set up. The usable version 7 events codes are defined in the corresponding document.

Entry point table

The entry point table contains the following columns:

Type

This field can be either Object or Entry p, depending on the type of hook (on objects or on entry points) used.

Standard script

Defines the standard script name where the entry point has been implemented. This is only entered for Entry p typed lines.

Object

Defines the object where the vertical script has been implemented. This is only entered for Object typed lines.

Title

For information purposes.

Specific script

Defines the script supplied to implement the specific code (a $ACTION label must be present inside).

Module

For information purposes.

Activity

Activity code that protects the entry point line against updates. If the corresponding activity code is inactive, the script will not be called.

Order

This field defines the execution order of the entry points when several lines are present for the same object or entry point. This is a new feature of version 7.2. Note that the order will never be changed on existing lines when the line is patched again.

Setup

Free field that can be used by developers.

Execution time

At execution time on an object:
* The specific script is executed first.
* If GPV is equal to 0 after specific script, all the vertical scripts with an activity code set to active are executed in the ascending ranking order.
* The standard script is executed last (if GPE is equal to 0).

At execution time on an entry point hook:
* all the vertical scripts with an activity code set to active are executed in the ascending ranking order.