Page 1 of 1

JiwaProcessSO

PostPosted: Tue Oct 22, 2019 6:16 pm
by Riyaz
Hi There

Trying to figure out the Jiwa 7 version of the below Jiwa 6 code, can you pls kindly guide as I can’t find the references accordingly.

Dim SOProcess As New JiwaProcessSO.clsSalesOrderProcess

            With SOProcess
                .Database = JiwaDatabase
                .CommonLib = JiwaLib
                .JLib = JiwaLib
               

                If .Setup() <> JiwaProcessSO.SalesOrderProcessReturnCodes.e_SalesOrderProcessReturnCodeSuccess Then
                    Throw New Exception(.ErrorModule & " - " & .ErrorString)
                Else
                   
                    If .ProcessSalesOrder(_InvoiceID, hwdWrite) <> JiwaProcessSO.SalesOrderProcessReturnCodes.e_SalesOrderProcessReturnCodeSuccess Then
                        Throw New Exception(.ErrorModule & " - " & .ErrorString)
                    End If
                End If

               
                .CleanUp()
               
            End With

            JiwaDatabase.Commit()

Re: JiwaProcessSO  Topic is solved

PostPosted: Tue Oct 22, 2019 9:20 pm
by Mike.Sheen
Hi Riyaz,

In version 6 we had a dedicated object for processing sales orders, which is what your code shown is using. In version 7 we made it simply a method of the sales order business logic - Process() - so you can achieve the same with the following:

Code: Select all
SalesOrder = Manager.BusinessLogicFactory.CreateBusinessLogic(Of JiwaFinancials.Jiwa.JiwaSales.SalesOrder.SalesOrder)(Nothing)
SalesOrder.Read(_InvoiceID)
SalesOrder.Process()

Re: JiwaProcessSO

PostPosted: Wed Oct 23, 2019 12:57 am
by Riyaz
Thanks very much Mike