JiwaProcessSO  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

JiwaProcessSO

Postby Riyaz » Tue Oct 22, 2019 6:16 pm

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()
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2

Re: JiwaProcessSO  Topic is solved

Postby Mike.Sheen » Tue Oct 22, 2019 9:20 pm

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()
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755

Re: JiwaProcessSO

Postby Riyaz » Wed Oct 23, 2019 12:57 am

Thanks very much Mike
Riyaz
Kohai
Kohai
 
Posts: 233
Joined: Wed Dec 02, 2015 2:05 pm
Topics Solved: 2


Return to Technical and or Programming

Who is online

Users browsing this forum: Google [Bot] and 1 guest