I'm trying to extend the ExpenseJournalLineEntity that is used in the Edit in Excel experience. I need to add a field that is added to the LedgerJournalTrans_Project table and that needs to be filled conditionally (so not on all situations). The field on the LedgerJournalTrans_Project table is a record id so referencing a record in another table.
I tried adding the reference table as a child datasource of datasource LedgerJournalTrans_Project in the entity as read-only and outer join. This gives errors when publishing from Excel on the added datasource, even if all fields are correctly filled.
Another approach is adding a unbound field to the enitty that holds the natural key value and based on this the refrecid on the LedgerJournalTrans_Project table is set. This works partially. When publishing the correct value is stored in the LedgerJournalTrans_Project record but after the update the field on the entity and in Excel is cleared. I have to refresh the data in Excel to get the value in Excel.
Then I tried to force the correct values to be set on the entity after the data was updated (on the postLoad). For this I added a copy of the entity field LedgerJournaltTrans_Project field which is private (and thus cannot be used in my extension class) on the standard entity as extension field to the enitty with the same mapping as the standard file. In the postLoad method after the update this exention field however is empty whereas the field LedgerJournalTrans_Project has a value. Why is this happening? Is there something that I'm missing go get my extension fields correctly populated.
Anyone that can provide me some more insights on this? Thanks in advance!!
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.