Hi,
We're working on importing Expense Claim lines to AX from an external tool.
In order to do this, we generated a Template that allows us to import the required data to the LedgerJournalTrans table. Our aim is to generate this document from our external tool, allow the employees to validate the information, and then push them to AX through the Microsoft Excel Import functionality.
Currently:
- We create the Expense Claim journal in AX (General Ledger ==> General Journal ==> New) which creates a record in the LedgerJournalTable.
- When the journal is created, a Journal Batch Number is generated.
- We then copy this Journal Batch Number and put it in our Excel Template.
- We import the Excel Template and populate the LedgerJournalTrans table.
- We then repeat this for every company in AX.
We would like to know if it would be possible, through an import (or worst case scenario as little coding as possible), to avoid the manual creation of the Expense Claims Journal line.
This means that an Expense Claim journal line would be created automatically in the LedgerJournalTable with the correct Journal Batch Number (automatically incremented from the last Journal batch number in the table) together with the corresponding Expense claim lines in LedgerJournalTrans table (with the newly created Journal Batch Number).
We thought of doing this by importing lines to the LedgerJournalTable but the Journal Batch Number is a required field so we're still faced with the same issue which is we can't know, unless we manually look, what the last Journal Batch Number was so that we can create a new entry to the LedgerJournalTable with the next one.
Thanks in advance for your input!
*This post is locked for comments