SyteLine IDO Custom Load Method (CLM) Generator
This generator writes a custom load method (CLM) in C# for a SyteLine 9 or CSI 10 IDO extension class. It returns a DataTable of late customer order lines built from SLCoitems, with the IDO metadata steps and a REST call that tests it.
Fill in
1. Custom load method (C#)
using System;
using System.Data;
using Mongoose.IDO;
using Mongoose.IDO.Protocol;
namespace Netray.SyteLine.Ext
{
[IDOExtensionClass("UETOpenOrderLines")]
public class UETOpenOrderLinesExt : IDOExtensionClass
{
// Custom load method: returns a DataTable whose column names must match
// the property names defined on the UETOpenOrderLines IDO.
[IDOMethod(MethodFlags.CustomLoad)]
public DataTable GetLateLinesClm(string Whse, int DaysLate)
{
DataTable dt = new DataTable("Results");
dt.Columns.Add("CoNum", typeof(string));
dt.Columns.Add("CoLine", typeof(short));
dt.Columns.Add("CoRelease", typeof(short));
dt.Columns.Add("Item", typeof(string));
dt.Columns.Add("DueDate", typeof(DateTime));
dt.Columns.Add("QtyOpen", typeof(decimal));
DateTime cutoff = DateTime.Today.AddDays(-DaysLate);
string safeWhse = (Whse ?? string.Empty).Replace("'", "''");
string filter = string.Format("Whse = N'{0}' AND Stat = N'O'", safeWhse);
LoadCollectionResponseData response = this.Context.Commands.LoadCollection(
"SLCoitems",
"CoNum, CoLine, CoRelease, Item, DueDate, QtyOrdered, QtyShipped",
filter,
"DueDate",
0);
int iCoNum = response.PropertyList.IndexOf("CoNum");
int iCoLine = response.PropertyList.IndexOf("CoLine");
int iCoRelease = response.PropertyList.IndexOf("CoRelease");
int iItem = response.PropertyList.IndexOf("Item");
int iDue = response.PropertyList.IndexOf("DueDate");
int iOrdered = response.PropertyList.IndexOf("QtyOrdered");
int iShipped = response.PropertyList.IndexOf("QtyShipped");
foreach (IDOItem row in response.Items)
{
if (row.PropertyValues[iDue].IsNull)
{
continue;
}
DateTime due = row.PropertyValues[iDue].GetValue<DateTime>();
if (due >= cutoff)
{
continue;
}
decimal qtyOpen = row.PropertyValues[iOrdered].GetValue<decimal>()
- row.PropertyValues[iShipped].GetValue<decimal>();
if (qtyOpen <= 0m)
{
continue;
}
dt.Rows.Add(
row.PropertyValues[iCoNum].GetValue<string>(),
row.PropertyValues[iCoLine].GetValue<short>(),
row.PropertyValues[iCoRelease].GetValue<short>(),
row.PropertyValues[iItem].GetValue<string>(),
due,
qtyOpen);
}
return dt;
}
}
}2. IDO metadata checklist
// IDO metadata checklist for UETOpenOrderLines.GetLateLinesClm // 1. Import the assembly on the IDO Custom Assemblies form and set the IDO's // Custom Assembly Name and Ext Class Name (Netray.SyteLine.Ext.UETOpenOrderLinesExt). // 2. Add method GetLateLinesClm with method type Custom Load and parameters // Whse (string) and DaysLate (int), in that order. // 3. Define IDO properties CoNum, CoLine, CoRelease, Item, DueDate, QtyOpen. // Names must match the DataTable column names exactly, including case. // 4. Make them unbound (not bound to a table column) with data types and // lengths that match the values returned. // 5. Refresh IDO metadata on the application server, then test with the // REST call below or from a form whose collection uses the custom load.
3. REST test call
GET https://sl-app01/IDORequestService/ido/load/UETOpenOrderLines?properties=CoNum,CoLine,CoRelease,Item,DueDate,QtyOpen&clm=GetLateLinesClm&clmparam=MAIN,5 Authorization: <token from the token request> X-Infor-MongooseConfig: SL_PROD Accept: application/json # clmparam lists the method parameters in declaration order, comma separated. # URL encode values that contain spaces or commas.
Based on the Mongoose IDO Development Guide: custom load methods return an IDataReader or a DataTable, and IDOMethod takes MethodFlags.CustomLoad. Verify for your release: the base class name (IDOExtensionClass in the guide's declaration sample), the SLCoitems property names and the Stat value for open lines, the REST v2 URL shape and headers your IDO request service expects, and whether a record cap of 0 means the default cap. The CLM output columns are fixed in this template; edit the DataTable columns and the IDO properties together.
Get your CLM reviewed
Send us your custom load method and IDO metadata and we will check property mapping, filters and load size against your SyteLine release.
Optional. The tool and every export work without this. No spam.
How to use it
Choose the IDO that will expose the result, usually a custom UET IDO with only unbound properties, and the method name. Set the source IDO, an extra filter and a record cap for the load inside the method. The parameters are Whse and DaysLate, and the output columns are CoNum, CoLine, CoRelease, Item, DueDate and QtyOpen. Copy block 1 into your extension class project, then follow block 2 to add the method as a Custom Load method and define matching properties. Fill the base URL, configuration and test values to get block 3, a REST call you can paste into Postman.
How a custom load method works
A standard IDO load reads the table the IDO is bound to. A custom load method replaces that: the IDO calls your method, and whatever DataTable or IDataReader it returns becomes the collection a form, report or REST client sees. Each DataTable column is matched to an IDO property by name, so the names must match exactly. Parameters come from the caller; over REST they are passed in clmparam in the order the method declares them. Inside the method you can load other IDOs, call procedures or compute values, here open quantity as QtyOrdered minus QtyShipped and lateness against today minus DaysLate.
- Flag: MethodFlags.CustomLoad
- Return type: DataTable or IDataReader
- Column names = IDO property names
- REST: clm and clmparam on the load call
Worked example
With Whse MAIN and DaysLate 5, the method loads SLCoitems where Whse = N'MAIN' and Stat = N'O', sorted by due date. A line due 12 days ago with 100 ordered and 40 shipped passes: due date is before today minus five days and QtyOpen is 60. A line due 2 days ago is skipped, and so is a fully shipped line. The REST call returns those rows as a collection with the six properties, ready for a dashboard, an ION workflow or a Mongoose form grid bound to UETOpenOrderLines.
Gotchas
A property defined on the IDO but missing from the DataTable comes back empty, and a column with a different name is ignored, so keep both lists in step. The filter inside the method controls how many rows the source load returns; a loose filter with a high cap reads the whole order book on every call. Dates and decimals must use the right .NET types, or conversion fails when the IDO maps values. Filtering and sorting requested by the caller do not automatically apply to a CLM; the guide's topic on including filters in custom load methods shows how to honour them. Escape every string parameter you put into a filter.
Frequently Asked Questions
What is an IDO in SyteLine?
An IDO, or Intelligent Data Object, is the Mongoose business object layer between forms and the SQL database. It defines properties, methods and events, applies security and runs business logic. Forms, reports, the Excel add-in and REST clients all load and update data through IDOs.
What is the difference between a custom load method and a hand-coded method?
A hand-coded method returns an integer status and passes values back through parameters such as Infobar. A custom load method returns rows, as a DataTable or IDataReader, which the IDO presents as its collection. Use a CLM when the caller needs a result set, such as a grid or a REST load.
How do I select records from an IDO in Mongoose code?
Call this.Context.Commands.LoadCollection with the IDO name, property list, filter, order by and record cap, or build a LoadCollectionRequestData object. Read the response by finding each property's index in PropertyList and calling GetValue on the item's PropertyValues, or by using the response indexer with row and property name.
How do I call a custom load method over REST?
Use the normal IDO load request for the IDO with the properties you want, plus clm set to the method name and clmparam set to the parameter values in order. Authenticate the same way as any other IDO request service call on your release.
If you want your team to ask SyteLine for late lines and shortages in plain English instead of building a CLM for each question, we can set up a private AI layer on your own servers.
Related Tools
SyteLine IDO Extension Class Method Generator
Fill in the IDO, method and load details and get a complete C# extension class with a hand-coded method, a request-object variant and the deployment steps.
Developer ToolsSyteLine IDO REST Request Generator
Fill in host, configuration, IDO, properties and filter to get ready-to-use REST calls for loading, updating and invoking methods on SyteLine IDOs.
Developer ToolsSyteLine SQL User-Defined Data Types Reference
The SQL Server user-defined data types SyteLine uses for columns and stored procedure parameters, with scripts to read exact lengths from your own database.
Infor SyteLineSyteLine IDO Names Reference
Searchable list of common SyteLine IDO names with the underlying tables, to speed up REST integrations and form work.
Infor SyteLineSyteLine Admin Forms and Utilities Reference
The forms and server utilities a SyteLine 9 or 10 on-prem admin uses for configuration, background tasks, events, replication, customization and security, with what each is for.
More Developer Tools tools
See all- SyteLine SQL Query Generator for Item, Job and Order Tables
- SyteLine SQL Blocking and Long Running Query Script Generator
- SyteLine Custom Table CREATE Script Generator
- SyteLine Mongoose Framework Events Reference
- SyteLine Event Action Types Reference
- SyteLine Event Action Parameter Functions Reference
- SyteLine WinStudio Standard Form Events Reference
- SyteLine Mongoose API Options Reference
- SyteLine Form Script Generator
Keep exploring
Free tools
- SyteLine IDO Extension Class Method GeneratorFill in the IDO, method and load details and get a complete C# extension class with a hand-coded method, a request-object variant and the deployment steps.
- SyteLine Custom Stored Procedure IDO Method GeneratorBuild a SyteLine-style stored procedure with typed parameters, @Infobar messaging and a severity return code, then test it and publish it as an IDO method.
- SyteLine ION API IDO Request GeneratorTurn a .ionapi backend service file into working PowerShell and curl calls that load SyteLine IDO data through ION API, including bookmark paging.
ERP fixes and how-tos
- How to Add a Custom Method to a SyteLine IDO in C#How to expose a new server-side operation on a SyteLine IDO: define the method on the IDO Collection, implement it in C#, and call it safely.
- How to Call SyteLine IDOs from an External ApplicationHow the SyteLine IDO SOAP web service works, how to authenticate and call Load, Update, and Invoke from external code, and where it commonly fails.
- How to Add Custom Business Logic to a SyteLine IDO with an Extension ClassAdd custom validation to a SyteLine IDO without touching generated code: extension class structure, BeforeAdd/AfterModify events, and deployment steps.
Guides
- How to Build Custom IDOs in Infor SyteLineLearn how to create custom IDOs in Infor SyteLine from scratch. Step-by-step guide covering IDO class creation, property mapping, and deployment to CloudSuite Industrial.
- SyteLine IDO Custom Property and Method CreationCreate custom IDO properties and methods in SyteLine. Property mapping, method signatures, stored procedures, and .NET method development guide.
- InvokeIDO Method Examples for SyteLine ScriptsPractical SyteLine InvokeIDO method examples for form scripts and integrations. Call standard and custom IDO methods from scripts with parameter passing and error handling.