Is there a way to see if an order is locked before I try to edit it in my code? If for any reason my code errors out and does not fully complete the order is locked or in the event I need to update a record that a user has open?
var search = os.Orders.FirstOrDefault(t => t.Number == spec.BaseNumber);
if (search == null) return os.NewOrder(spec);
try
{
//can i check for the order being locked here before returning?
return os.OpenOrder(search, OrderEditMode.ReadWrite);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
There is no way to determine if the order is already opened by someone that I am aware of. I have asked R&D if they have a method. I'll let you know when they report back.