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 eventIdCase "ExportProcess"Dim BankTransactionView As finBankTransactionViewDim GlExportBankTransaction As finGlExportBankTransactionDim GlExportBankTransactionLine As finGlExportBankTransactionLine' Create ObjectsBankTransactionView = finBL.CreateBankTransactionView()For Each GlExportBankTransaction In GlExportNew.BankTransactionsIf GlExportBankTransaction.BankTransactionPk <> 0 ThenIf BankTransactionView.LoadFromBankTransactionPk(GlExportBankTransaction.BankTransactionPk) ThenIf BankTransactionView.IsImported ThenGlExportBankTransaction.Myob_Memo = BankTransactionView.ImportedDetailsForDisplay.GetString("OtherParty")For Each GlExportBankTransactionLine In GlExportBankTransaction.LinesGlExportBankTransactionLine.Myob_Memo = String.Format("{0} {1} {2}", BankTransactionView.ImportedDetailsForDisplay.GetString("Particulars"), BankTransactionView.ImportedDetailsForDisplay.GetString("Code"), BankTransactionView.ImportedDetailsForDisplay.GetString("Reference"))NextEnd IfEnd IfEnd IfNext