Skip to main content

Notifications

Business Central forum
Suggested answer

Attempted to Divide by Zero Error

Posted on by 78
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.
 
 
 
 
Categories:
  • GS-17051342-0 Profile Picture
    GS-17051342-0 78 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 78 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. 
  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 45,295 Super User 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 4,791 Super User 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 Profile Picture
    Matteo 28 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 78 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 61,962 Super User 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

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,623 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,463 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans