# Infor LN DAL Hook Checklist for Developers

> Source: https://netray.co/tools/infor-ln-dal-hook-checklist
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Review checklist for LN data access layer (DAL) scripts: hook choice, validation, error handling, performance and upgrade safety.

## Category

infor-ln

## Erp

Infor LN

## Audience

- LN developer
- Technical lead
- Code reviewer

## Tool

**Kind:** checklist

**Scoring Note:** Count the items you can tick. Treat unticked critical items as blockers before promoting a DAL change to production.

**Groups:**

#### Design and hook choice

**Items:**

**Text:** The rule truly belongs in the DAL (must hold for every entry path), not only in one session script

**Critical:** true

Object-level hooks (new, save, destroy) are used for whole-record rules

Field-level hooks are used for single-field validation and defaults

**Text:** Before hooks validate and reject, after hooks only follow up

**Critical:** true

**Text:** The change is in the customer VRC, not in the standard component

**Critical:** true

Purpose, author and date are documented in the script header

#### Validation and error handling

**Items:**

**Text:** Every rejection returns a clear message from a message code, not hard-coded text

**Critical:** true

Return values are checked after every DAL or database call

Rules work for create, update and delete paths separately

Blank, zero and unusual enum values are handled

**Text:** No silent failure: errors are surfaced to the caller

**Critical:** true

Behavior is defined when called from import, BDE or integration, not only the UI

#### Data integrity and transactions

**Items:**

**Text:** The hook does not commit or abort transactions on its own unless designed to

**Critical:** true

Related tables are updated in the same logical transaction

Cross-company access is deliberate and uses the right company number

Locking behavior is understood and rows are not held longer than needed

Derived values are recalculated when their inputs change

#### Performance

**Items:**

**Text:** No SQL select inside a loop that could be a single set-based query

**Critical:** true

Queries use indexed fields in the where clause

Heavy logic is not placed in a hook fired for every line of a mass update

Repeated lookups are cached in a variable for the call

Timing was measured with realistic volumes, not one record

#### Testing and upgrade safety

**Items:**

**Text:** Tested through the session, an import and an integration path

**Critical:** true

Regression test covers the standard behavior near the hook

A rollback plan exists for the transport or VRC change

The customization is listed in the upgrade inventory

Standard functionality was checked to see if it now covers the need

A reviewer other than the author signed off

## Content

**Intro:** The data access layer (DAL) is where Infor LN rules should live when they must hold regardless of how data arrives. This checklist walks a developer or reviewer through hook choice, validation, transactions, performance and upgrade safety for a DAL script.

**Sections:**

#### How to use the checklist

**Body:** Run it as a peer review before a DAL change goes to test and again before production. Tick each item you can confirm from the code or from a test, and treat unticked critical items as blockers. Attach the exported list to the change ticket so the reasons for each decision are traceable. It works equally well for a new hook and for reviewing an old customization you inherited.

#### Why the DAL, and what hooks are for

**Body:** A DAL script sits on the table, so a rule there applies when a user saves in a session, when an import writes a record and when an integration calls the object. Hooks are the points where your code runs: object-level hooks around new, save and destroy, and field-level hooks for validation and defaults. Validation belongs before the change is stored, follow-up work after it. Exact hook names and parameters vary by version, so match them to your environment.

**Bullets:**

- Whole-record rules go on object hooks
- Single-field rules and defaults go on field hooks
- Keep each hook short and call functions for reusable logic

#### Common mistakes

**Body:** The usual defects are rules written only in a session script, hard-coded error text, queries inside loops that make mass updates slow, and hooks that quietly swallow an error. Developers also forget non-UI paths: an import or a BDE that bypasses the screen but not the DAL can fail in unexpected ways when a hook assumes screen state. Test the hook through every path, measure with realistic volumes and keep an upgrade inventory so nothing is lost at the next release.

**Cta:** If you want a faster inventory and review of DAL and 4GL customizations across your LN estate, we can discuss an on-prem assistant that reads and summarizes them.

**Faq:**

#### What is a DAL in Infor LN?

**Answer:** The data access layer is a script attached to a table that enforces rules and defaults whenever data is created, changed or deleted, whether through a session, an import or an integration. It centralizes business rules instead of repeating them in each screen.

#### When should I use a DAL hook instead of a session script?

**Answer:** Use a DAL hook when the rule must apply on every path to the table. Use a session script for presentation and behavior specific to one screen. Many solutions combine them, with data rules in the DAL and user interface logic in the session.

#### Why is my DAL change slow on mass updates?

**Answer:** A hook runs for each record, so a query or heavy calculation inside it multiplies. Look for selects inside loops, missing index use and repeated lookups, and measure with realistic volumes before promoting the change.

#### Is this checklist valid for every LN version?

**Answer:** The review principles hold across versions, but hook names, parameters and tools differ. Check specifics against the documentation for your version and a known working script in your environment.

## Search terms

infor ln dal hooks, infor ln dal script, baan dal checklist, infor ln data access layer, dal before.save.object, ln dal code review, infor ln customization review checklist

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