Skip to Content
author's profile photo Former Member
Former Member

[Help] How To Get CashFlow(primary form item) Object In B1?

dear experts,

I created add on for payment checklist, and i have successfully get the outgoing payment object. but i have one big problem, i cannot get the object for Cash flow. please help me how to catch that object and include it on my add on..

here is my code to get the payment object, it's work, but i confused how to get cashflow object? please help...

oPay = B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oVendorPayments)

For j = 1 To matrix0.RowCount cardcode = matrix0.Columns.Item("CC").Cells.Item(j).Specific.value cardname = matrix0.Columns.Item("CN").Cells.Item(j).Specific.value cashaccount = matrix0.Columns.Item("AT").Cells.Item(j).Specific.value cashsum = matrix0.Columns.Item("ST").Cells.Item(j).Specific.value InvNumber = matrix0.Columns.Item("DE").Cells.Item(j).Specific.value InvSum = matrix0.Columns.Item("ST").Cells.Item(j).Specific.Value

With oPay ' Bussiness Partner .DocType = SAPbobsCOM.BoRcptTypes.rSupplier .CardCode = cardcode .CardName = cardname

' Document Summary .DocDate = Date.Now .TaxDate = Date.Now .LocalCurrency = SAPbobsCOM.BoYesNoEnum.tYES .Remarks = remarks

If Left(matrix0.Columns.Item("AN").Cells.Item(j).Specific.value, 4) = "Kas " Then ' Cash .CashAccount = cashaccount .CashSum = cashsum Else ' Bank .TransferAccount = cashaccount .TransferSum = cashsum End If

'Invoices() .Invoices.DocEntry = InvNumber .Invoices.SumApplied = InvSum .Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_PurchaseInvoice .Invoices.Add() End With

iRetCode = oPay.Add() If iRetCode = 0 Then ' Update Status Dim sql As String sql = "Update [dbo].[@IDU_PAYMENT_DET] SET U_Status='Closed' WHERE U_BaseEntr='" & matrix0.Columns.Item("DE").Cells.Item(j).Specific.VALUE & "'" IDU._executeQuery(sql)

Dim sql2 As String sql2 = "Update [dbo].[@IDU_PAYMENT_HDR] SET Status='C' WHERE DocEntry='" & form.Items.Item("3").Specific.VALUE & "'" IDU._executeQuery(sql2) Else B1Connections.diCompany.GetLastError(iRetCode, serrmsg) B1Connections.theAppl.MessageBox(serrmsg) Return False End If Next
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.