Infor LN User Exit (UE) DLL Template Generator
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.
Fill in
The DLL is named after this table with the suffix ue.
Your own table in your customer VRC. Example name only.
Library tccom100ue: header and declaration
|****************************************************************************** |* User Exit DLL tccom100ue for table tccom100 |* Purpose: Write the business partner code and a timestamp to a custom log table so an external system can pick up changes. |* Author : AJ |* Rule : must not change standard LN behaviour |****************************************************************************** #include <bic_dal> table ttccom100 table ttccus900
After the standard before.save.object
function extern long ue.after.before.save.object(long mode)
{
| runs right after the standard before-save handling of tccom100
| the record being saved is in the tccom100 buffer
tccus900.bpid = tccom100.bpid
tccus900.logt = utc.num()
db.insert(ttccus900, db.retry)
| no commit: the standard transaction commits or rolls back
return(0)
}After the standard after.destroy.object
function extern long ue.after.after.destroy.object()
{
| runs after the standard after-delete handling of tccom100
tccus900.bpid = tccom100.bpid
tccus900.logt = utc.num()
db.insert(ttccus900, db.retry)
return(0)
}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.
Plan your LN extensions
Send us the change you need and your LN version, and we will tell you whether a user exit, a DAL change or an integration fits best.
Optional. The tool and every export work without this. No spam.
How to use it
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
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.
- 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
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
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.
Frequently Asked Questions
What is a user exit in Infor LN?
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?
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?
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?
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.
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.
Related Tools
Infor LN DAL Script Template Generator
Generate a Data Access Layer (DAL) script skeleton for an LN table with object hooks, a field check hook, a mandatory hook and error message handling.
Developer ToolsInfor LN Inbound Process.SalesOrder BOD XML Template
Generate an OAGIS ProcessSalesOrder BOD skeleton with ApplicationArea, ActionCriteria, a sales order header and order lines for testing LN inbound orders.
Developer ToolsInfor LN AFS (stpapi) Session Automation Script Generator
Generate Application Function Server (AFS) functions that insert, update and delete records through a standard LN session without its user interface.
Infor LN & BaanInfor LN DAL Hook Review Checklist
Review checklist for LN data access layer (DAL) scripts: hook choice, validation, error handling, performance and upgrade safety.
More Developer Tools tools
See all- Infor LN DAL and User Exit Hook Functions Reference
- Infor LN Report Script Template Generator
- Infor LN ION API OAuth 2.0 REST Call Generator (Python)
- SAP Sales Order ABAP SELECT Generator (VBAK, VBAP, VBFA)
- SAP Sales Order Create BAPI ABAP Generator (BAPI_SALESORDER_CREATEFROMDAT2)
- SAP ABAP Open Items SELECT Generator
- SAP ACDOCA SQL Query Generator
- SAP QM Inspection Lot ABAP SELECT Generator
- SAP Quality Notification Pareto SQL Query Generator
Keep exploring
Free tools
- Infor LN DAL and User Exit Hook Functions ReferenceLookup table of LN DAL object hooks, property hooks, user exit hooks and DAL functions with when they fire, what they return and the common traps.
- Infor LN AFS (stpapi) Session Automation Script GeneratorGenerate Application Function Server (AFS) functions that insert, update and delete records through a standard LN session without its user interface.
- Infor LN Report Script Template GeneratorGenerate a 4GL report script for an LN report with program sections, layout sections, a suppress condition and a running total.
ERP fixes and how-tos
- How to Create an Infor LN User from a User Template and Copy AuthorizationsCreate Infor LN users from user templates and roles, copy authorizations safely, and avoid the common mistakes that give new users too much or too little.
- Infor LN Date Format: User, Language, Reports and IntegrationsHow date formats work in Infor LN: user and language settings, Web UI locale, reports, and how to handle date conversion in integrations and BODs.
- How to Add Users in the Baan / Infor LN GUI (Including Admin Access)Step by step: create a user in Baan or Infor LN with the User Data session, copy from a template, assign roles and authorizations, and what admin access you need.
Guides
- Infor LN DLL Customization: Extending Business Logic with Custom LibrariesDevelop custom DLLs for Infor LN extending business logic, forms, and external system calls. C/C++ and .NET DLL development patterns for LN customization.
- Infor LN BShell Customization GuideMaster Infor LN BShell customization. 4GL programming patterns, session scripting, DLL extensions, and upgrade-safe customization techniques.
- Extending Standard Infor LN Tables: Developer GuideExtend standard Infor LN tables safely with custom fields, triggers, and validation logic. Avoid upgrade conflicts with proven extension patterns for BAAN/LN.
Integrations
- How to add AI agents to Infor LNHow to add AI agents to Infor LN: a tool layer over ION API and BODs, read-only reporting first, approval before writes, and fully on-prem model hosting.
- How to use ChatGPT with Infor LNHow to use ChatGPT with Infor LN: exporting data versus live access through ION API, custom GPT actions, enterprise data controls, and when a private model fits better.