With the new upgarde to 2026.100, has anyone had an issue with Nested Loops in Functions. We have a function that uses nested looping to set values in the database from one table to another. It was working in 2025.2, but after the update its now throwing an open Data Reader error.
Did Epicor make some change to functions.
Yes. MARS has been disabled. Search the forum and restructure your code.
If the custom code contains nested database queries inside foreach loops (for example, iterating through Db.OrderDtl records and then executing a query against Db.OrderRel before the first query has finished enumerating), the system can encounter the following error:
There is already an open DataReader associated with this Connection which must be closed first.
This occurs when a LINQ query is still actively streaming results from SQL and another query is executed using the same database context before the original query has completed.
Possible resolution
Instead of directly iterating over a database query:
foreach (var ttOrderDtl_row in Db.OrderDtl …)
{
...
}
materialize the results first:
var orderDtlRecords =
(from ttOrderDtl_row in Db.OrderDtl
...
select ttOrderDtl_row).ToList();
foreach (var ttOrderDtl_row in orderDtlRecords)
{
...
}
Using ToList() should force the query to execute completely and closes the underlying data reader before any nested queries are performed. The same approach should be considered for any other nested query loops within a custom code action.
The Kinetic application help article titled Migrating from Entity Framework 6 to Entity Framework Core (EF Core) has a section named MARS (Multiple Active Result Sets)" with some additional context.
Note, this is not a universal solution. It is a good starting point.
Research accordingly.

Is this going to impact BPM’s as well.
Yes.
Epicor SaaS has switched to Linux containers, EF Core, and disabled MARS.
The advice posted here and other places applies everywhere custom code runs.
This also applies to Epicor’s own code, so if you encounter concurrency errors or similar with native code, please make sure to file a ticket.