Article Details
Id: | 19717 |
Product: | finPOWER Connect |
Type: | NEW |
Version: | 4.00.00 |
Opened: | 20/07/2021 |
Closed: | 18/10/2022 |
Released: | 21/12/2022 |
Job: | J027021 |
MYOB API Interface; added optional "Memo" properties for Bank Transactions
The MYOB API Interface now includes optional "Memo" properties for Bank Transactions that can be scripted.
These properties are:
- finGlExportBankTransaction.Myob_Memo
- finGlExportBankTransactionLine.Myob_Memo
They would normally be left blank to use standard functionality - but a script can override as required. These will appear in the transaction created in MYOB.
Here is a code snippet for a "GLExportNew" Object Events script. For imported Bank Transactions this sets the Memo on the Transaction to the imported "Other Party" detail and on the Lines to the Particulars, Code and Reference.
Select Case eventId
Case "ExportProcess"
Dim BankTransactionView As finBankTransactionView
Dim GlExportBankTransaction As finGlExportBankTransaction
Dim GlExportBankTransactionLine As finGlExportBankTransactionLine
' Create Objects
BankTransactionView = finBL.CreateBankTransactionView()
For Each GlExportBankTransaction In GlExportNew.BankTransactions
If GlExportBankTransaction.BankTransactionPk <> 0 Then
If BankTransactionView.LoadFromBankTransactionPk(GlExportBankTransaction.BankTransactionPk) Then
If BankTransactionView.IsImported Then
GlExportBankTransaction.Myob_Memo = BankTransactionView.ImportedDetailsForDisplay.GetString("OtherParty")
For Each GlExportBankTransactionLine In GlExportBankTransaction.Lines
GlExportBankTransactionLine.Myob_Memo = String.Format("{0} {1} {2}", BankTransactionView.ImportedDetailsForDisplay.GetString("Particulars"), BankTransactionView.ImportedDetailsForDisplay.GetString("Code"), BankTransactionView.ImportedDetailsForDisplay.GetString("Reference"))
Next
End If
End If
End If
Next