OrderSelect fails on existing ticket numbers

 

I have just come across a seriously weird issue. If I delete a pending order, 9 times out of 10 I can't do an OrderSelect on the same ticket number afterwards. I'm really puzzled why selecting an existing (yet closed) ticket number would fail???

Don't ask me why I'm selecting the order again, it's a long story :)

 
kieran.w:

I have just come across a seriously weird issue. If I delete a pending order, 9 times out of 10 I can't do an OrderSelect on the same ticket number afterwards. I'm really puzzled why selecting an existing (yet closed) ticket number would fail???

Don't ask me why I'm selecting the order again, it's a long story :)

Of course, a deleted pending order doesn't exist any more, there is nothing weird in that.
 
angevoyageur:
Of course, a deleted pending order doesn't exist any more, there is nothing weird in that.
This discussion was had recently, the deleted Pending Order exists in the History Pool so should be selectable by ticket.
 

When it's still a pending order I can select it just fine, but if I delete it and then re-select it again immediately after, it fails.

The ticket number exists in the account history obviously, and hasn't changed. If I select the ticket number a few minutes later it works fine, so I'm wondering if there's a best practice for this?

 
kieran.w:

When it's still a pending order I can select it just fine, but if I delete it and then re-select it again immediately after, it fails.

The ticket number exists in the account history obviously, and hasn't changed. If I select the ticket number a few minutes later it works fine, so I'm wondering if there's a best practice for this?

Show your code.
 
kieran.w:

When it's still a pending order I can select it just fine, but if I delete it and then re-select it again immediately after, it fails.

The ticket number exists in the account history obviously, and hasn't changed. If I select the ticket number a few minutes later it works fine, so I'm wondering if there's a best practice for this?

Perhaps there is a small delay in the Order moving from the Order pool to the History pool . . . try a 2 second sleep before you try to select it from the History pool.
 
You havent said wether the second selection is from history or not.
 
tonny:
You havent said wether the second selection is from history or not.
I can't do an OrderSelect on the same ticket number afterwards.

Select by Ticket does not require the pool to be specified.
Reason: