Page 1 of 1

Get Current Display Sales Order History, NOT Last one

PostPosted: Tue Feb 13, 2024 9:06 am
by Ernst
When I'm using the send to freight system button the freight tab.

It ends up in code like this.

Dim salesOrderForm As JiwaSalesUI.SalesOrder.SalesOrderEntryForm = DirectCast(button.FindForm, JiwaSalesUI.SalesOrder.SalesOrderEntryForm)
Dim salesOrder As JiwaSales.SalesOrder.SalesOrder = DirectCast(salesOrderForm.SalesOrder , JiwaSales.SalesOrder.SalesOrder)
Dim SalesOrderH As JiwaSales.SalesOrder.SalesOrderHistory = salesOrder.SalesOrderHistorys(salesorder.CurrentHistoryNo)

We found cases where we are on D03, but want to send D02 to the freight company.
The above code selected the latest history, so just continues to resend D03.
How do I change the above code so the salesorderH, pick up the current displayed D02, rather than the last current history D03. Can I get it from the form somewhere?

e.g. Picture below Shows D03, when I'm looking at D02.
ShowsD03.PNG

Re: Get Current Display Sales Order History, NOT Last one  Topic is solved

PostPosted: Tue Feb 13, 2024 9:19 am
by Scott.Pearce
Dim SalesOrderH As JiwaSales.SalesOrder.SalesOrderHistory = salesOrder.SalesOrderHistorys(salesorder.SelectedHistoryNo)