web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Attempted to Divide by Zero Error

(1) ShareShare
ReportReport
Posted on by 360
I am trying to post a payment to my employees via the payment journal. I am getting this error that I have never seen before. The payment are for employee T&E reimbursements. I have no idea what is causing this error.
 
 
 
 
I have the same question (2)
  • Suggested answer
    Valentin Castravet Profile Picture
    32,319 Super User 2026 Season 1 on at
    Usually this is a problem caused by a customization. Do you have any customizations for the payment journal or employees?
     
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,419 User Group Leader on at
    Hi,
     
    It seems a custom Dev.
     
    Test it in Cronus environment without extension. If you still have error, then report it to Microsoft.
     
    Regards,
    Saurav Dhyani
  • Suggested answer
    YUN ZHU Profile Picture
    99,322 Super User 2026 Season 1 on at
    It could also be a data problem. If this is a standard environment, it is recommended to debug it.
    The reason for this error is very simple. There is division by 0 in the code.
     
     
    Hope this helps as well.
    Thanks.
    ZHU
  • GS-17051342-0 Profile Picture
    360 on at
    We don't have any customizations related to the payment journal. I have forwarded this issue to our Business Central partner. Just started happening after being on BC for 9 months. 
  • Matteo Fiocco Profile Picture
    260 on at
    it's definitely a custom, try getting help from a developer.

    -----------
    Matteo Fiocco - Business Central Architect
    Blog : www.matteofiocco.com
    Linkedin :  https://www.linkedin.com/in/matfioc/

  • kerr Profile Picture
    21 on at
    Hi GS,
     
    I have same issue here, only when "Applies-to Doc. No." is filled. 
     
    Debug goes to the following line, in my case these 2 currency code are both empty (local currency), not sure why it needs to be divided by Original Currency Factor, which is 0.
  • Suggested answer
    Jun Wang Profile Picture
    8,210 Moderator on at
    if you have a clean sandbox, try to replicate the issue there to pinpoint to if this is a data issue or caused by extension. 
    also you need to test with other employees if they could be paid with no issue.
  • Verified answer
    Mohana Yadav Profile Picture
    61,204 Super User 2026 Season 1 on at
    It looks like an error in standard code based on the below screenshot. Please create a MS support case.
  • kerr Profile Picture
    21 on at
    At the end the "Original Currency Factor" is a new field in v24, which default to 1. But for old entries they're 0. According to MS you need to reverse old entries and create new ones. 
  • CU23050236-0 Profile Picture
    on at
    I have the same problems !
     

Under review

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,947 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,120 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 628 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans