Method BPM loop through Order Lines

BPM on method quote.CreateOrder

I am trying to update each order line with a value from the corresponding quote line…

Here is my code(not complete):

var Sales = ServiceRenderer.GetService<Erp.Contracts.SalesOrderSvcContract>(Db);
var Quote = ServiceRenderer.GetService<Erp.Contracts.QuoteSvcContract>(Db);

var OrderDataSet = Sales.GetByID(orderNum);

var Order_xRow = (from OrderTable_Row in OrderDataSet.OrderHed
      where OrderTable_Row.OrderNum==orderNum
      select OrderTable_Row).FirstOrDefault();
      
if (Order_xRow != null)
{
        foreach(var OrderTable_Row in Order_xRow)
        {
           Order_xRow.DiscBreakListCode = family; 
           Order_xRow.NotifyFlag=true;
           Order_xRow.RowMod = "U";
           Sales.Update(ref OrderDataSet);
        }
}

Getting error: CS1579 foreach statement cannot operate on variables of type ‘OrderHedRow’ because ‘OrderHedRow’ does not contain a public instance or extension definition for ‘GetEnumerator’**

I think I understand the issue but not how to resolve it… Any help is greatly appreciated. Cheers

Order_xRow is one row. There is nothing to enumerate.

Thanks. As soon as I posted this I saw it was not a great question… Didn’t know if/how I could delete it. Thanks again for your help.

Nonsense.

It’s actually a great highlight of the idea that just explaining the problem so someone else can help you solve it, without the listener even saying anything. AKA rubber duck debugging.

I didn’t know there was a name for that! I should get a duck, as my wife sometimes falls asleep before I get to the error.