# SyteLine EXTGEN Stored Procedure Generator

> Source: https://netray.co/tools/syteline-extgen-stored-procedure-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Create a documented extgen_ override for a base SyteLine procedure and audit existing overrides against their base procedures after each update.

## Category

developer

## Erp

Infor SyteLine

## Audience

- SyteLine developer
- SQL Server DBA
- ERP administrator

## Tool

**Kind:** template

**Output:** code

**Language:** sql

**Fields:**

#### Base procedure name

**Key:** base

**Type:** text

**Default:** BaseProcedureNameSp

**Help:** Paste the exact base name from the Edit Stored Procedure form or sys.procedures.

#### Parameter list copied from the base procedure header

**Key:** params

**Type:** textarea

**Default:**     @CoNum    CoNumType
  , @Infobar  InfobarType OUTPUT

**Help:** Paste the parameter list exactly, same names, types, order and OUTPUT markers.

#### Change description

**Key:** change_desc

**Type:** textarea

**Default:** Block the base action when the customer is on credit hold and show the hold reason.

#### Author

**Key:** author

**Type:** text

**Default:** J. Developer

#### Ticket number

**Key:** ticket

**Type:** text

**Default:** CHG-2026-114

#### Override mode

**Key:** mode

**Type:** select

**Options:**

- Copy base logic and modify
- Replace base logic

**Default:** Copy base logic and modify

**Blocks:**

#### 1. Override skeleton

**Body:** /* =============================================================
   EXTGEN override of dbo.{{base}}
   Purpose : {{change_desc}}
   Author  : {{author}}
   Ticket  : {{ticket}}
   Mode    : {{mode}}
   Base modify_date when copied: <fill in from block 3>
   ============================================================= */
CREATE PROCEDURE dbo.EXTGEN_{{base}} (
{{params}}
)
AS
BEGIN
  SET NOCOUNT ON;

  DECLARE @Severity INT = 0;

  -- Copy mode: paste the base body here WITHOUT its extgen redirect block,
  --            then change only what the ticket requires and mark each change.
  -- Replace mode: write the new logic and set every OUTPUT parameter callers expect.

  -- custom logic placeholder

  RETURN @Severity;
END
GO

#### 2. How the mechanism works

**Body:** -- Base procedures that support extension check near the start for a procedure
-- named extgen_<BaseName>. If it exists, the base runs it in place of its own logic.
-- SQL Server matches the name case-insensitively under the usual case-insensitive
-- collation, so EXTGEN_ and extgen_ refer to the same object.
--
-- Your copy must NOT contain that redirect check, or it can call itself.
-- Easiest path: Edit Stored Procedure form > select dbo.{{base}} > Remove To Extgen > Copy Procedure.
-- That copy adds the prefix and removes the redirect code; then edit and submit it.
-- The submitted code must begin with CREATE PROCEDURE.
--
-- After every Infor update, open the EXTGEN Listing form:
--   green  = matches the base method
--   yellow = base changed after your extgen: Edit Stored Procedure > Compare w/ Base, merge, resubmit
--   red    = no base method exists (removed or replaced by an assembly extension):
--            rebuild the change as an IDO extension class.

#### 3. Audit existing overrides

**Body:** -- All overrides in this database
SELECT name, create_date, modify_date
FROM sys.procedures
WHERE name LIKE 'EXTGEN[_]%'
ORDER BY name;

-- Override vs base: which bases changed after the override was written
SELECT e.name        AS extgen_proc,
       e.modify_date AS extgen_modified,
       b.name        AS base_proc,
       b.modify_date AS base_modified,
       CASE WHEN b.object_id IS NULL THEN 'Base missing'
            WHEN b.modify_date > e.modify_date THEN 'Base newer: review'
            ELSE 'OK' END AS status
FROM sys.procedures AS e
LEFT JOIN sys.procedures AS b
  ON b.name = SUBSTRING(e.name, 8, 128)
WHERE e.name LIKE 'EXTGEN[_]%'
ORDER BY status, e.name;

-- Does the base still contain the extgen redirect? (0 = not found)
SELECT CHARINDEX('EXTGEN_', UPPER(OBJECT_DEFINITION(OBJECT_ID(N'dbo.{{base}}')))) AS redirect_position;

**Notes:** Based on the Mongoose and CSI 10.x documentation for extended (extgen_) stored procedures and the EXTGEN Listing form. Confirm the form names on SyteLine 9.x before relying on them. The parameter list must match the base exactly. Extgen procedures are an on-premises technique; plan to move overrides to IDO extension classes for cloud.

## Content

**Intro:** This generator builds the skeleton of an extgen_ override for a base SyteLine 9.x or CSI 10.x stored procedure, with a change header, the base parameter list and audit queries. Use it when a base procedure needs different behaviour and no IDO event or extension point fits.

**Sections:**

#### How to use it

**Body:** Enter the exact base procedure name and paste its parameter list from the base header without changes: same names, user-defined types, order and OUTPUT markers. Describe the change, the author and ticket, and choose whether you copy and modify the base logic or replace it. The header records the base procedure's modify_date at copy time, which is what you compare against after the next update. In practice, generate the copy with the Edit Stored Procedure form (Remove To Extgen, Copy Procedure) so the redirect code is removed for you, then use this skeleton's header and structure to document it.

**Bullets:**

- One override per base procedure; keep it in source control.
- Mark every changed line with the ticket number.
- Test both the success path and every error path the base had.

#### Where this lives in SyteLine

**Body:** Base procedures that support extension look for a procedure named extgen_ plus their own name and run it instead of their own logic when it exists. The Edit Stored Procedure form creates the copy, and the EXTGEN Listing form lists every extgen_ method with a status colour: green when it matches the base, yellow when the base was modified more recently, red when no base exists. The usual fix for a red one is to rebuild the change as an IDO extension class that does the same work. Compare w/ Base on the Edit Stored Procedure form shows the differences to merge for a yellow one.

#### Worked example: the audit after an update

**Body:** After applying an update, run block 3. Suppose EXTGEN_ fixed three procedures: two show OK, one shows Base newer: review because Infor shipped a fix to the base after your override was written. Open that one in the EXTGEN Listing form, which shows yellow, use Compare w/ Base to see the new base code, merge Infor's fix into your copy and resubmit. If a row shows Base missing, the base was removed or moved to code, and your override no longer runs at all: rebuild the change as an extension class.

#### Gotchas

**Body:** A parameter mismatch causes errors at call time, not when you create the procedure, so test through the form that calls the base. Copy mode freezes the base logic as of the copy date, so every later Infor fix to that procedure is missing from your system until you merge it; this is the main long-term cost of extgen. Replace mode is cleaner but you own every output parameter. Overrides are invisible to users and easy to forget, so keep a register of them with the ticket and owner.

**Cta:** If you are planning an upgrade and want an inventory of extgen overrides and what each one would become in an extension class, we can produce that from your database on site.

**Faq:**

#### What is an extgen stored procedure in SyteLine?

**Answer:** It is a copy of a base Infor stored procedure with the extgen_ prefix. Base procedures that support extension check whether that copy exists and, if it does, run it instead of their own logic. It lets you change base behaviour without editing the vendor object, which an update would overwrite.

#### Is it EXTGEN_ or extgen_?

**Answer:** Infor documentation writes extgen_ in lower case. SyteLine databases normally use a case-insensitive collation, so SQL Server treats EXTGEN_ and extgen_ as the same name. Pick one style, use it consistently, and search with LIKE 'EXTGEN[_]%' so the underscore is matched literally.

#### What does a yellow entry on the EXTGEN Listing form mean?

**Answer:** The base method was modified more recently than your extgen version, usually by an Infor update. Open Edit Stored Procedure, use Compare w/ Base to see the differences, merge what you need into your copy and resubmit. Until you do, your system runs your older copy of the logic.

#### Should I still use extgen in new work?

**Answer:** Only when no IDO event, extension class or configuration option fits. Extgen is an on-premises database technique and each override needs review after every update. For new behaviour, and for anything that may move to CloudSuite Industrial, an IDO extension class is the more durable choice.

## Search terms

infor mongoose extgen stored procedure, syteline extgen, extgen_ stored procedure, syteline ido development guide, infor mongoose development guide, extgen listing form, syteline override base stored procedure

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
