# Infor LN User Exit (UE) DLL Template Generator

> Source: https://netray.co/tools/infor-ln-user-exit-ue-dll-template-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Generate a User Exit DLL for an LN table that adds your own logic around the standard save and delete handling, without changing standard code.

## Category

developer

## Erp

Infor LN

## Audience

- LN developer
- Technical consultant
- Integration developer

## Tool

**Kind:** template

**Output:** code

**Language:** text

**Fields:**

#### Standard table code

**Key:** table

**Type:** text

**Default:** tccom100

**Help:** The DLL is named after this table with the suffix ue.

#### Custom log table code

**Key:** custom_table

**Type:** text

**Default:** tccus900

**Help:** Your own table in your customer VRC. Example name only.

#### Key field to copy

**Key:** key_field

**Type:** text

**Default:** bpid

#### What the user exit should do

**Key:** action

**Type:** textarea

**Default:** Write the business partner code and a timestamp to a custom log table so an external system can pick up changes.

#### Author

**Key:** author

**Type:** text

**Default:** AJ

**Blocks:**

#### Library {{table}}ue: header and declaration

**Body:** |******************************************************************************
|* User Exit DLL {{table}}ue for table {{table}}
|* Purpose: {{action}}
|* Author : {{author}}
|* Rule   : must not change standard LN behaviour
|******************************************************************************
#include <bic_dal>

table	t{{table}}
table	t{{custom_table}}

#### After the standard before.save.object

**Body:** function extern long ue.after.before.save.object(long mode)
{
	| runs right after the standard before-save handling of {{table}}
	| the record being saved is in the {{table}} buffer
	{{custom_table}}.{{key_field}} = {{table}}.{{key_field}}
	{{custom_table}}.logt = utc.num()
	db.insert(t{{custom_table}}, db.retry)
	| no commit: the standard transaction commits or rolls back
	return(0)
}

#### After the standard after.destroy.object

**Body:** function extern long ue.after.after.destroy.object()
{
	| runs after the standard after-delete handling of {{table}}
	{{custom_table}}.{{key_field}} = {{table}}.{{key_field}}
	{{custom_table}}.logt = utc.num()
	db.insert(t{{custom_table}}, db.retry)
	return(0)
}

**Notes:** Infor documents the naming (table code plus ue, for example tccom001ue), the #include <bic_dal> line and the hooks ue.after.before.save.object and ue.after.after.destroy.object. Other ue.* hooks follow the same pattern around the standard hooks, but confirm each name and its arguments in the Enterprise Studio libraries page and the Infor ES Programmer's Guide for your version before adding it. The custom table, its key column and the logt UTC column are examples: create them in your own VRC first.

## Content

**Intro:** A User Exit DLL lets you run your own code just before and after the standard save and delete handling of an LN table, without touching the standard DAL or session. This generator writes the DLL for an LN 10.x table, named after the table with the suffix ue, with the documented hooks and a sample insert into a custom log table.

**Sections:**

#### How to use it

**Body:** Enter the standard table (for example tccom100, business partners), the custom table you created in your own VRC, the key field to copy and a short description of the job. Create a library in Program Scripts / Libraries (ttadv2530m000) with the name the generator shows in the first heading, for example tccom100ue, paste the blocks and compile. LN picks the DLL up by its name; you do not register it in a session. Keep only the hooks you need and keep each one short, because it runs for every save or delete of that table.

#### How user exits fire

**Body:** Infor describes the User Exit DLL as business logic that runs automatically before and after the standard before and after handling. For 4GL sessions the hooks run just before and after the corresponding standard sections and hooks. For 3GL scripts and DLLs they run just before and after the database operation itself, such as db.insert, db.update and db.delete. The documented rule is that the logic should not change standard LN functionality: user exits are for integration and extra steps, such as logging, notifying or writing to your own tables.

**Bullets:**

- Name: <table code>ue, for example tccom100ue
- Include: #include <bic_dal>
- Documented hooks: ue.after.before.save.object, ue.after.after.destroy.object

#### Worked example

**Body:** With the defaults, every time a business partner in tccom100 is saved, the DLL writes the partner code and a UTC timestamp to tccus900, and it does the same after a business partner is deleted. An integration job or an on-prem assistant can then read tccus900 to pick up changes without polling the whole tccom100 table. Because the insert happens inside the standard transaction, the log row is committed only when the business partner change is committed, and disappears if the change is rolled back.

#### Gotchas

**Body:** Do not commit in a user exit and do not change fields of the standard record: both break the rule that standard behaviour stays the same and can corrupt the caller's transaction. Do not show messages or ask questions, since the save may come from a BOD or AFS call with no user. Keep the custom table in your own VRC so upgrades do not overwrite it. After an upgrade, recompile the user exit DLLs and retest, since standard hook behaviour can change between feature packs.

**Cta:** If you want change logs like this turned into plain-English answers for your team, we can add a private AI layer that reads them on your own servers.

**Faq:**

#### What is a user exit in Infor LN?

**Answer:** It is a library named after a table with the suffix ue that LN calls automatically around the standard save and delete handling of that table. It lets you add integration or extra processing without modifying standard sessions, DALs or scripts, which keeps upgrades simpler.

#### Where is the Infor LN extensions development guide for user exits?

**Answer:** The Libraries page of the LN Enterprise Studio online manual describes User Exit DLLs, and the Infor ES Programmer's Guide covers the hooks in more depth. Check the version that matches your Tools release, since the online manual exists for each LN 10.x release.

#### User exit or DAL change: which should I use?

**Answer:** Use a user exit when you need extra steps such as logging or integration and want to leave the standard DAL untouched. Change or extend validation through the DAL only when you own that logic. The user exit is not meant to change what standard LN does with the record.

#### Do user exits run for BOD and AFS updates?

**Answer:** They run around the standard handling of the table, and BOD and AFS updates go through that handling, so in general yes. Test it on your version: send a test BOD and run an AFS update in a test company and check that your custom table receives the rows.

## Search terms

infor ln user exit, infor ln user exit dll, infor ln extensions development guide, infor ln extension guide, ue.after.before.save.object, infor ln customization without changing standard

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