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

Discussions relating to plugin development, and the Jiwa API.

Get Current Display Sales Order History, NOT Last one

Postby Ernst » Tue Feb 13, 2024 9:06 am

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
User avatar
Ernst
Kohai
Kohai
 
Posts: 219
Joined: Tue Feb 19, 2008 3:43 pm
Topics Solved: 12

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

Postby Scott.Pearce » Tue Feb 13, 2024 9:19 am

Dim SalesOrderH As JiwaSales.SalesOrder.SalesOrderHistory = salesOrder.SalesOrderHistorys(salesorder.SelectedHistoryNo)
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 742
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 15 guests