Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Error log for Journal ...
Finance forum
Unanswered

Error log for Journal lines in D365 FO

Posted on by 29
Hi,
 
I would like to capture all the Journal line errors in a journal which is getting posted along with a custom string which is stored at line level. lets say line number in this case
 
For eg. there are 10 lines in a Journal and while posting 2 of those gave me error lets say
/Amount is too high for Voucher 1 / and  /Amount is too high for Voucher 2/ 
So in this case although I can distinguish the record via the voucher but I would also like to add an additional custom field which would give me above error as below
Amount is too high for Voucher 1 - line 1
Amount is too high for Voucher 1 - line 2
 
I have checked the classes and it seems most of the code is in ledgerjournalcheckpost , ledgerjournalcheckpostresults. but would like to understand at what point should I check and update the value so that I can get the new errors as requested.
 
Thanks,
VK
  • VM-02050213-0 Profile Picture
    VM-02050213-0 29 on at
    Error log for Journal lines in D365 FO
    Hi Martin,
     
    Thanks for the reply.
    I have checked the std code and its seems that the ledgerjournalcheckpostresults is the class that maintains the error details.
    My requirement is that when the error is being fetched I need to get the line number as well of that error so that the user knows which the line number is to be fixed.
     
    Thanks,
    VK.
  • Martin Dráb Profile Picture
    Martin Dráb 225,864 Super User on at
    Error log for Journal lines in D365 FO
    You'd have to collect more details than just that it's somewhere in these classes. You can, for example, put a breakpoint to Info.add(), validate the journal and check where exactly are the messages added. Look at the whole call stack and think about where you could add your logic.
     
    Note that adding setPrefix() will likely be much then modifying all the messages.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,584 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,864 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans