Page 1 of 1

sales order CurrentHistoryNo explanation required

PostPosted: Wed Jan 18, 2017 4:33 pm
by indikad
Sales Order window - ver 7.0.157
I need to grab the snaphot number ( the snaphot dropdown on the sales order window ) when the user clicks a custom button ( on the utilities band)

I have this bit of code below. It works however only gives me the last snaphot number ( 2 in this case ). and NOT the one I have selected on the drop down ( snaphot 1). In my test both snapshots have not been processed.

Code: Select all
   Public Sub SalesOrderForm_Toolbar_ToolClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs)
        If e.Tool.Key = SO_FILE_EXPORT_BUTTON_NAME Then
         Dim SalesOrderForm As JiwaFinancials.Jiwa.JiwaSalesUI.SalesOrder.BaseSalesOrderEntryForm = DirectCast(sender, Infragistics.Win.UltraWinToolbars.UltraToolbarsManager).DockWithinContainer
   
         
         msgbox ("Current history no = " +  SalesOrderForm.SalesOrder.CurrentHistoryNo.ToString)



what am I doing wrong here ?

Re: sales order CurrentHistoryNo explanation required  Topic is solved

PostPosted: Wed Jan 18, 2017 6:39 pm
by Mike.Sheen
Hi Indika,

SalesOrder.CurrentHistoryNo is the number of the most recent (current) snapshot. You want SalesOrder.SelectedHistoryNo instead.

Mike

Re: sales order CurrentHistoryNo explanation required

PostPosted: Wed Jan 18, 2017 7:39 pm
by indikad
Thanks heaps!!