C# PROGRAMMING TUTORIAL

Implementing Custom User-Defined (UD) Tables in Epicor

A complete developer guide to configuring custom UD tables (UD100, UD100A) in Epicor Kinetic and referencing them in C# scripts.

Overview

Epicor provides custom User-Defined (UD) tables (like UD100 and UD100A) to support tracking data that falls outside the standard schema. Using these tables allows developers to customize configurations without breaking core tables. For technical discussions and answers, visit the EpiUsers forum. Querying and reporting on user-defined data is easily handled by building a custom BAQ report, or exposing the tables via the Epicor REST API.

UD tables are organized using five primary key fields (Key1 through Key5). Key fields are configured as string types, meaning developers must design a consistent indexing layout to prevent duplicate records.

Technical Implementation Details

To implement this solution in your Epicor environment, utilize the following code block. Ensure you replace the standard configurations with your company database names, server URLs, and keys.

// C# BPM Script: Inserting a Record into a User-Defined Table (UD100)
using (var ud100BO = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.UD100SvcContract>(Db))
{
    var ds = new Ice.Tablesets.UD100Tableset();
    
    // Call GetNewUD100 to initialize default keys
    ud100BO.GetNewUD100(ref ds);
    
    var row = ds.UD100[0];
    row.Company = Session.CompanyID; // Explicit company context alignment
    row.Key1 = "INV-10045"; // Unique Key 1
    row.Key2 = "SUPPLIER_01"; // Unique Key 2
    row.Character01 = "Flagged for manual inventory analysis";
    row.Number01 = 450.50; // Custom Decimal Value
    
    ud100BO.Update(ds);
}

Process Verification and Flow

After creating a UD table, regenerate the database model through Epicor Administration Console. This step exposes the UD business object classes to the compilation environment, allowing you to reference them in BPMs.

Related Resources & Services

Related Resources & Services

Looking for Professional ERP Customization Support?

Learn more about our Custom ERP Enhancements Services or contact Amit directly to outline your optimization goals.

Request Free ERP Automation Audit