Page 1 of 1

InvoiceNo parameter for Sale OrderBatchProcessBefore

PostPosted: Wed Oct 14, 2015 3:05 pm
by indikad
Hi Experts,

Trying to convert a breakout that is on the 6.5.13
SalesOrderBatchProcessing event ProcessInvoiceBefore

I may have got the event correct. as below
Code: Select all
Dim SalesOrdBatchForm As JiwaSalesUI.BatchProcessing.BatchProcess
AddHandler  SalesOrdBatchForm.BatchProcess.ProcessStart,  AddressOf SalesOdrerBatchProcessStart


now need to find the the InvoiceId ( or InvoiceNo) - the code below does not give the what I need. Any help is appreciated.
Code: Select all
Private Sub SalesOdrerBatchProcessStart(sender As Object, e As System.EventArgs)
      Dim oSalesOrderBatch As JiwaSales.BatchProcessing.BatchProcess    = DirectCast( sender , JiwaSales.BatchProcessing.BatchProcess )
      msgbox ("invoiceno - " +  oSalesOrderBatch.Ranges.InvoiceNo.ToString())
      msgbox ("debtor account no - " +  oSalesOrderBatch.Ranges.DebtorAccountNo.ToString())
      
End Sub

Re: InvoiceNo parameter for Sale OrderBatchProcessBefore

PostPosted: Tue Oct 20, 2015 9:18 am
by Scott.Pearce
Try looking at:

Code: Select all
oSalesOrderBatch.Ranges.InvoiceNo.From.InvoiceNo.ToString()

Re: InvoiceNo parameter for Sale OrderBatchProcessBefore

PostPosted: Thu Oct 29, 2015 2:01 pm
by indikad
Hi Scott,

Thanks for this - it gives me the Invoice number
- however it is from the selection criteria list ( the top grid ).
What I was expecting ( and need ) is to get the Invoices selected for processing ( the bottom grid )
The event in 6513 "Process Invoice Before" ( in BatchBreakoiuts ) is able to give me the Invoice id as this event (in 6513) fires once each for every invoice being processed.

I need a similar outcome - is my Jiwa7 event correct ?
Code: Select all
            Dim SalesOrdBatchForm As JiwaSalesUI.BatchProcessing.BatchProcess = DirectCast(JiwaForm, JiwaApplication.IJiwaForm)         
         AddHandler  SalesOrdBatchForm.BatchProcess.ProcessStart  , AddressOf SalesOdrerBatchProcessStart 'SalesOrdForm.Sale.sOrder.SaveEnding  , AddressOf SalesOrderSaveEnding

Re: InvoiceNo parameter for Sale OrderBatchProcessBefore

PostPosted: Fri Oct 30, 2015 8:39 am
by Scott.Pearce
You should use the ProcessingCandidate or ProcessedCandidate event.

Re: InvoiceNo parameter for Sale OrderBatchProcessBefore

PostPosted: Fri Oct 30, 2015 1:30 pm
by indikad
Hi Scott - thanks again. are you able to tell me the class path for the CancelEventArgs for ProcessingCandidate evet ?
see screenshot attached below.

Re: InvoiceNo parameter for Sale OrderBatchProcessBefore  Topic is solved

PostPosted: Fri Oct 30, 2015 2:01 pm
by Scott.Pearce
I'm not sure off the top of my head. If you need to know namespace information, you should load up Visual Studio, reference the assembly you are using (i.e. Jiwa Sales.dll), and then use the object browser to locate the event. The object browser always shows the full namespace for parameters.