Entry Points in Sage ERP X3 provide a way to apply custom code into advanced processes without modifying or affecting the standard process. Standard Entry Points are provided within many processes where custom code can be called to perform custom actions, such as modifying custom tables or performing customized actions.
Identifying Available Entry Points
There are several ways to determine where entry points exist in Sage X3 code.
Option 1: Use the Sage X3 Help
To access the Sage ERP X3 Help, while logged onto X3, click the question mark (?) at the top of the screen, and select "Contents".
In the "Development" section, there is an item for "Entry Points". Click on the "Entry Points" link, then select the module to view Entry Points.
A list of processes within the selected module will appear. Within each process, there is a list of entry points that are available, along with a description of what each entry point can be used for. A general understanding of the processes is required to determine which process to use for the entry point.
Option 2: Search the Sage X3 code for entry points
Within the Sage ERP X3 code, entry points are indicated by the keyword "GPOINT". To search directly for entry points in a particular processing, search for the word "GPOINT".
As an example, below is an entry point in the standard code for Sales Order Entry (Object SOH).
Creating an Entry Point Customization
Step 1: Create the Process Code
The first step in creating the entry point is to create the process code. To do this, open the process editor (Development > Processes > Processes > Process editor). An $ACTION section should be added to the process code, with an action defined for the entry point(s) to be utilized. In the example below, the entry point "CPLCREGRA" will trigger custom code to be executed in $CPLCREGRA.
$ACTION
Case ACTION
When "CPLCREGRA" : Gosub CPLCREGRA
Endcase
Return$CPLCREGRA
# Enter custom code to perform table updates, etc.
.
.
.
.
Return
The processing must then be compiled, and assigned a name, such as ZXXXXXX or YXXXXXX, depending on whether it is a customization by a partner or customer. If an entry point is being created for process SUBSOH, it is recommended that it be named YSUBSOH or ZSUBSOH.
Step 2: Create the Entry Point
The final step is to create the entry point. This will "attach" the processing code for the entry point to the Standard process. To do this, go to "Entry Points" (Development > Processes > Processes > Entry points). The example below attached specific processing ZSUBSOH as an entry point to standard process SUBSOH.