Infor SyteLine

Extending SyteLine IDOs with Custom Extension Methods

IDO extension methods let you inject custom C# business logic directly into the SyteLine IDO pipeline. Whether you need to enforce complex validation rules, call external APIs during a save operation, or compute derived values before returning data, extension classes are the supported mechanism for extending IDO behavior without modifying base SyteLine code.

Setting Up an IDO Extension Class Project

Create a new C# class library project in Visual Studio targeting the .NET Framework version matching your SyteLine server (typically 4.6.2 or 4.8). Reference the Mongoose.IDO.dll and Mongoose.IDO.Protocol.dll assemblies from your SyteLine installation directory. Your extension class must inherit from IIDOExtensionClass or ExtensionClassBase and be marked with the IDOExtensionClass attribute specifying the target IDO name. Each method you want to expose must be decorated with the IDOMethod attribute.

  • Reference Mongoose.IDO.dll, Mongoose.IDO.Protocol.dll, and Mongoose.Core.dll from the SyteLine server
  • Inherit from ExtensionClassBase to access Context, ThisRequest, and SetResultMessage helpers
  • Decorate the class: [IDOExtensionClass("YourIDOName")] public class YourExtension : ExtensionClassBase
  • Decorate methods: [IDOMethod(MethodFlags.CustomLoad, "MethodName")] for custom load operations
  • Build the DLL and copy it to the IDOExtensionClasses folder, then recycle the IDO Runtime app pool

Writing Pre-Save and Post-Save Logic

The most common extension method patterns intercept the UpdateCollection pipeline at specific stages. Override the SetPropertyValue method for property-level validation, or implement a custom method triggered by the BeginUpdate/EndUpdate lifecycle. For pre-save validation, throw an IDOMethodException with a user-friendly message to halt the save and display the error on the form. For post-save operations like audit logging or integration triggers, hook into the EndUpdate pipeline using a custom method bound to the IDO's UserUpdate event.

  • Use SetPropertyValue override to validate individual field changes in real time
  • Throw new IDOMethodException(errorCode, message) to block saves with form-visible error messages
  • Access the current row context: this.Context.Commands for pending INSERT/UPDATE/DELETE operations
  • Call LoadDataSet internally for cross-IDO validation: var ds = this.Context.Commands.LoadDataSet("SLItems", ...)
  • Register post-save methods using [IDOMethod(MethodFlags.CustomUpdate)] for audit and integration hooks

Debugging and Deploying Extension Classes

Debugging IDO extension classes requires attaching Visual Studio to the IDO Runtime process (w3wp.exe or the Mongoose Runtime Windows service). Set breakpoints in your extension code, then trigger the IDO operation from a SyteLine form. For production deployments, implement structured logging using the SyteLine LogManager class rather than Debug.WriteLine, and always test your extension in an isolated environment before promoting. Use the IDO Runtime diagnostic page to verify your extension class loaded successfully.

  • Attach debugger to w3wp.exe hosting the Mongoose.IDORuntime application pool
  • Check IDO Runtime logs in the SyteLine server\Log directory for class loading errors
  • Use LogManager.GetLogger(typeof(YourClass)).Info() for production-safe logging
  • Deploy updated DLLs during a maintenance window and recycle the app pool to load changes
  • Verify extension registration via the IDO Runtime diagnostic URL: http://server/IDORequestService/IDODiag.aspx

Netray AI agents can scaffold extension class projects, generate method stubs with best-practice patterns, and validate your IDO wiring. See how AI-powered development accelerates SyteLine customization.