Converting a method directive (Customer.Update) from ABL to C# using the conversion tool. The code compiles but there are errors at runtime. I have narrowed the problem down to the “foreach” statement below. When I remove that section the rest of the code runs.
Error:
BPM runtime caught an unexpected exception of ‘NotSupportedException’ type.
See more info in the Inner Exception section of Exception Details.
Part of the error description:
LINQ to Entities does not recognize the method ‘System.Object get_Item(System.String)’ method, and this method cannot be translated into a store expression.
Erp.Tables.Customer Customer;
foreach (var Customer_xRow in (from Customer_Row in Db.Customer
where Customer_Row.Company == ttCustomer_xRow.Company && (decimal)Customer_Row[“Number01”] >= 35000 && (decimal)Customer_Row[“Number01”] <= 99999
select Customer_Row))
Most of the searches I find on this refer to casting but that part looks correct to me.
Thanks,
Bill Short