Article Details
| Id: | 19509 |
| Product: | finPOWER Connect |
| Type: | NEW |
| Version: | 4.00.00 |
| Opened: | 30/08/2022 |
| Closed: | 30/08/2022 |
| Released: | 21/12/2022 |
| Job: | J029485 |
Xero API Interface; added optional "Reference" properties for Bank Transactions
The Xero API Interface now includes optional "Reference" properties for Bank Transactions that can be scripted.
These properties are:
- finGlExportBankTransaction.Xero_Reference
- finGlExportBankTransactionLine.Xero_Reference
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 Xero.
Here is a code snippet for a "GLExportNew" Object Events script. For imported Bank Transactions this sets the Reference 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.Xero_ContactId = "" ' Set to something?GlExportBankTransaction.Xero_Reference = BankTransactionView.ImportedDetailsForDisplay.GetString("OtherParty")For Each GlExportBankTransactionLine In GlExportBankTransaction.LinesGlExportBankTransactionLine.Xero_Reference = String.Format("{0} {1} {2}", BankTransactionView.ImportedDetailsForDisplay.GetString("Particulars"), BankTransactionView.ImportedDetailsForDisplay.GetString("Code"), BankTransactionView.ImportedDetailsForDisplay.GetString("Reference"))NextEnd IfEnd IfEnd IfNext