Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Divide by Zero Exception: How do I fix this???

(0) ShareShare
ReportReport
Posted on by 40

I get a "Divide by Zero Exception" error message when trying to update my standard cost via the Standard Cost Worksheet. i also receive this error when trying to close my inventory period. In both instances, the error message prevents me from completing these tasks which means I cannot correct my standard cost on the item or close my inventory period. Why do I get this error? How do I fix this error?

*This post is locked for comments

  • TWBlaisdell Profile Picture
    on at
    Re: Divide by Zero Exception: How do I fix this???

    Eric,

    The following link is to the Customer Source access:

    https://mbs.microsoft.com/customersource/documentation/whitepapers/navcostingerrordetectionwp.htm?printpage=false&sid=czungajnr2pr0skmb2hvlrjp&stext=Costing error detection

    Thanks

    Tom

  • Eric Droit Profile Picture
    40 on at
    Re: Divide by Zero Exception: How do I fix this???

    Savatage99 - What debugger?

    Tom - Where do I find this Costing Error Detection Toolkit Report?

    Thanks for your responses!

    Eric

  • Suggested answer
    TWBlaisdell Profile Picture
    on at
    Re: Divide by Zero Exception: How do I fix this???

    Hello,

    I will add some additional information to the response.  In previous reports of the Divide By Zero error, the problem was the result of some data corruption where the ILE data had been deleted but the Value Entries and Item Application Entries had not been consistently deleted..  

    The Costing Error Detection Toolkit Report would be a possible starting point to determine the extent of any data issues. You would want to work with your partner to analyze the results and determine possible next steps.  The complexity of managing an issue with a "divide by zero" error go beyond what can be managed through this Forum.

    Thanks

    Tom

    Thomas Blaisdell, MIcrosoft Dynamics NAV Support Contributor

  • Community Member Profile Picture
    on at
    Re: Divide by Zero Exception: How do I fix this???

    You can turn on the debugger to see where it stops.  Also, It's probably some custom code or some field you are not filling out properly.

    Any code dealing with division by zero should be written as

    if x = 0

    then y := 0 //stops the crash

    else y := z/x;

    taking into account the possiblity of division by zero and preventing crashes.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,207 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans