I am creating vendor invoice journal using custom data entity with data source ledgerJournalTable & ledgerJournalTrans. (using data management import D365FO)
I need to initialize default value for some fields like TransactionType, JournalType, Currency and so on. as per client they dont want to include this fields value in excel it should be defaulting automatically.
I tried it on PostLoad, PersistEntity method of data entity. but not able to achieve it.
any suggession would be helpful.
If I understand it correctly, you're importing data, therefore postLoad() is completely unrelated to your task. That's used when loading data from database.
There are several places where you could put your logic, such as initializeEntityDataSource().
I achieved it on persistEntity() of data entity.