Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

Attempted to Divide by Zero Error

Posted on by 126
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.
 
 
 
 
  • GS-17051342-0 Profile Picture
    GS-17051342-0 126 on at
    Attempted to Divide by Zero Error
    The issue was a bug in the Microsoft update.
     
     
    Did another update and the issue was gone.
  • GS-17051342-0 Profile Picture
    GS-17051342-0 126 on at
    Attempted to Divide by Zero Error
    I confirmed that this is happening to all employees. I singled out each employee in the batch and continued to get that error.
  • CU23050236-0 Profile Picture
    CU23050236-0 34 on at
    Attempted to Divide by Zero Error
    I have the same problems !
     
  • kerr Profile Picture
    kerr 21 on at
    Attempted to Divide by Zero Error
    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. 
  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,135 Super User 2024 Season 2 on at
    Attempted to Divide by Zero Error
    It looks like an error in standard code based on the below screenshot. Please create a MS support case.
  • Suggested answer
    Jun Wang Profile Picture
    Jun Wang 7,443 Super User 2024 Season 2 on at
    Attempted to Divide by Zero Error
    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.
  • kerr Profile Picture
    kerr 21 on at
    Attempted to Divide by Zero Error
    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.
  • Matteo Fiocco Profile Picture
    Matteo Fiocco 97 on at
    Attempted to Divide by Zero Error
    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/

  • GS-17051342-0 Profile Picture
    GS-17051342-0 126 on at
    Attempted to Divide by Zero Error
    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. 
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,472 Super User 2024 Season 2 on at
    Attempted to Divide by Zero Error
    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans