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 25
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 25 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,000 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

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,682 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,000 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans