SyteLine Mongoose .NET Client Generator (C#)
This generator writes an external C# program that uses the Mongoose .NET IDO client library to log on to SyteLine 10 / CSI and load IDO data. Optional blocks add a custom load method and a nested parent and child load.
Fill in
Placeholder name. Use the custom load method defined on your IDO (IDOs form, Methods).
1. Log on and load a collection
using System;
using Mongoose.IDO;
using Mongoose.IDO.Protocol;
class Program
{
static void Main()
{
string requestServiceURL = "http://utilserver/IDORequestService/RequestService.aspx";
string password = Environment.GetEnvironmentVariable("SL_PASSWORD");
using (Client client = new Client(requestServiceURL, IDOProtocol.Http))
{
OpenSessionResponseData session = client.OpenSession("svc_integration", password, "CSI_PROD");
if (!session.LogonSucceeded)
{
Console.WriteLine("Logon failed for svc_integration on CSI_PROD");
return;
}
LoadCollectionRequestData request = new LoadCollectionRequestData
{
IDOName = "SLItems",
PropertyList = new PropertyList("Item, Description, UM"),
Filter = "Item LIKE 'PN-%'",
RecordCap = -1
};
LoadCollectionResponseData response = client.LoadCollection(request);
foreach (IDOItem item in response.Items)
{
foreach (IDOPropertyValue property in item.PropertyValues)
{
Console.Write(property.Value + " ");
}
Console.WriteLine();
}
}
}
}2. Optional: custom load method
// Replace the request in block 1 when the IDO loads through a custom load method.
// Parameters are positional, in the order the method declares them.
InvokeParameterList clmParameters = new InvokeParameterList
{
"first parameter value",
"second parameter value"
};
CustomLoadMethod clm = new CustomLoadMethod
{
Name = "UETItemNotesLoadSp",
Parameters = clmParameters
};
LoadCollectionRequestData request = new LoadCollectionRequestData
{
IDOName = "SLItems",
PropertyList = new PropertyList("Item, Description, UM"),
RecordCap = -1,
CustomLoadMethod = clm
};3. Optional: nested parent and child load
LoadCollectionRequestData childRequest = new LoadCollectionRequestData
{
IDOName = "SLItemWhses",
PropertyList = new PropertyList("Whse, QtyOnHand"),
RecordCap = -1
};
// Link on a property with the same name on parent and child.
// If the names differ, check the SetLinkBy argument order in your library version.
childRequest.SetLinkBy("Item", "Item");
LoadCollectionRequestData parentRequest = new LoadCollectionRequestData
{
IDOName = "SLItems",
PropertyList = new PropertyList("Item, Description, UM"),
Filter = "Item LIKE 'PN-%'",
RecordCap = -1
};
parentRequest.AddNestedRequest(childRequest);
LoadCollectionResponseData response = client.LoadCollection(parentRequest);
// Each parent IDOItem carries its child rows; inspect them in the debugger for your library version.Built from the Mongoose IDO integration guide examples for OpenSession and LoadCollection (.NET). Reference the IDO client and protocol assemblies that ship with your Mongoose / SyteLine utility server or SDK; Client is in Mongoose.IDO and the protocol classes are in Mongoose.IDO.Protocol. Verify the request service URL, assembly names and the Filter property name for your version. The block 2 default is a placeholder; replace it with a custom load method that exists on your IDO.
Integration code review
Send the generated program and your SyteLine version; we will check assemblies, logon handling and load patterns.
Optional. The tool and every export work without this. No spam.
How to use it
Create a .NET console project and reference the Mongoose IDO client and protocol assemblies from your utility server or SDK. Set the request service URL, which follows the pattern http://servername/IDORequestService/RequestService.aspx, plus the configuration, user and the environment variable that holds the password. Choose the IDO, properties, filter and record cap and run block 1. It opens a session, checks LogonSucceeded and prints each row's property values in property list order. Add block 2 or 3 when the IDO needs a custom load method or you want child rows in one round trip.
- IDOProtocol.Http goes through the request service URL.
- IDOProtocol.Ipc talks to the IDO Runtime Service on the same machine and ignores the URL.
- Wrap the client in using so it is disposed.
Where this fits
The .NET client library uses the same request and response classes (Mongoose.IDO.Protocol) that form scripts and IDO extension classes use, so it is a natural choice for Windows services, scheduled jobs and tools that move data between SyteLine and other systems. LoadCollectionRequestData describes the load, LoadCollectionResponseData returns IDOItem rows with IDOPropertyValue values, and OpenSession behaves like a user logging on, so the integration user's groups decide which IDOs it can read. For inserts and updates the same client offers UpdateCollection, which runs IDO validation like a form save.
Worked example
With the defaults the program logs on to CSI_PROD as svc_integration, loads up to 200 items whose number starts with PN-, and prints Item, Description and UM per line. Adding block 3 loads the same items with their SLItemWhses rows linked on Item, so one call returns each item with its warehouse quantities. If logon fails, check the configuration name first: it must match a configuration on that utility server exactly, and the user must be allowed to log on to it.
Version notes
Assembly names and the exact client API surface have changed across Mongoose releases, so build against the assemblies from the server you will call, not a copy from another environment. Cloud tenants generally use ION API and REST instead of this library. Treat record cap 0 with care: it returns every matching row in one response. Keep property lists short; each property adds work on the server and size to the response.
Frequently Asked Questions
What is a Mongoose hello world in C#?
The smallest useful program creates a Client with the request service URL, calls OpenSession with user, password and configuration, checks LogonSucceeded, then runs one LoadCollection on a small IDO and prints the values. Block 1 is exactly that, so it doubles as a connectivity test for a new environment.
Which DLLs do I reference?
The IDO client and protocol assemblies that ship with the Mongoose framework on your SyteLine utility server or in the SDK. Names vary by release, so take them from the server you target. The Client class sits in the Mongoose.IDO namespace and the request and response classes in Mongoose.IDO.Protocol.
What is a custom load method?
A method, often a stored procedure, that the IDO uses to produce rows instead of a plain table query. You name it in CustomLoadMethod and pass its parameters as an InvokeParameterList in declared order. You can see which IDOs use one on the IDOs form, where the method is listed against the IDO.
Is this better than REST?
For .NET code running inside your network it is a typed, efficient option and avoids hand-built JSON. REST is simpler for non-.NET tools and is the path for cloud tenants through ION API. Many sites use the .NET client for services and REST for scripts and low-code tools.
If you want your team to ask SyteLine questions in plain English rather than writing a client per question, we can run a private assistant on your servers using the same IDO layer.
Related Tools
SyteLine IDO SOAP Web Service Client Generator
Generate a working C# console client and a PowerShell equivalent for the Mongoose IDO SOAP web service on on-premises SyteLine.
Developer ToolsSyteLine ION API IDO Request Generator
Turn a .ionapi backend service file into working PowerShell and curl calls that load SyteLine IDO data through ION API, including bookmark paging.
Developer ToolsSyteLine Form Script Generator
Fill in the form, IDO, properties and target variable to get a VB form script method for SyteLine 9/10 that loads related data and shows it on the form.
Infor SyteLineSyteLine IDO Names Reference
Searchable list of common SyteLine IDO names with the underlying tables, to speed up REST integrations and form work.
More Developer Tools tools
See all- SyteLine IDO REST Request Generator
- 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
Keep exploring
Free tools
- SyteLine IDO SOAP Web Service Client GeneratorGenerate a working C# console client and a PowerShell equivalent for the Mongoose IDO SOAP web service on on-premises SyteLine.
- SyteLine Mongoose API Options ReferenceA side-by-side reference of the Mongoose interfaces for SyteLine 9/10 and CSI: endpoint, authentication, operations, best use and the traps in each.
- SyteLine Mongoose Customization Deployment ChecklistDev to test to production promotion checks for Mongoose forms, IDO metadata, extension class assemblies, SQL objects, events and reports on SyteLine 9 and CSI 10.
ERP fixes and how-tos
- Fixing SyteLine's 'Object reference not set to an instance of an object' errorSyteLine throws 'object reference not set to an instance of an object' when a form or IDO method hits a null value. Here is how to trace it to the field, IDO method or customization that is missing data, with real fixes.
- Timed out waiting for response from Mongoose: fixing the request timeoutFix the SyteLine message timed out waiting for response from Mongoose: separate app server, IIS, client and SQL timeouts and tune the one that fires.
- Diagnosing and fixing SyteLine session timeout errorsSyteLine session timeouts (client or web) usually trace to IIS/app pool settings, IDO session limits, or load balancer idle timeouts. Here is where each timeout is configured and how to diagnose which one is firing.
Guides
- SyteLine Mongoose IDO Development GuideMaster SyteLine IDO development with Mongoose. IDO architecture, custom methods, stored procedures, and IDL best practices for CloudSuite Industrial.
- SyteLine Client vs Server Script Architecture GuideUnderstand SyteLine client vs server script execution. Form scripts, IDO methods, execution context, and when to use each for optimal performance.
- How to Set Up SyteLine Mongoose IntegrationGuide to integrating Infor Mongoose framework with SyteLine CloudSuite Industrial. Learn form development, IDO extensions, event scripting, and deployment configuration.