Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Config. Package Errors - Attempted to Divide by Zero

Posted on by 195

I'm importing Payables Opening Balance from legacy system to BC365 using Configuration Package Table 81.

I come to this error when the line is actually multicurrency transaction. For LCY transactions, I don't have this problem, it only happen to Multicurrency transactions. Any idea what causing this to happen?

In the migration data, I have input the exchange rate in Currency Factor.

Attempted-to-divide-by-zero.jpg

  • Kelvin Hew Profile Picture
    Kelvin Hew 195 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    True.

    I found out later on that I just need to rearrange the Processing Order of the Currency and Amount field in the Configuration package.

  • Suggested answer
    Danko Profile Picture
    Danko 10 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    Hi, 

    you just have to import amount first and then currency. Took me few hours to get to that :D.

  • Suggested answer
    Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    Hi,

    Just as Teddy said that removing validation can be dangerous I agree to that.

    It can be dangerous but will allow you to fill the fields.

    All you need to do is manually type in the amount for the entries which will validate it.

  • Suggested answer
    TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    Skipping the validation on the Amount is quite dangerous. Check everything, check the Amount LCY, etc.

  • Suggested answer
    Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    Hi Kevin,

    You can do Preview Posting and see if there are any issues prior to posting if there are any issues in the entries.

    I don't think there should be any issues if it is posting.

  • Kelvin Hew Profile Picture
    Kelvin Hew 195 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    Hi Olister, your suggestion is working. As I try to post the data, it seems fine too.

    By skipping the validation in "Amount" field, will it bring any side effect at the back end?

  • Kelvin Hew Profile Picture
    Kelvin Hew 195 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    I try to import using a single line transaction (with multicurrency), I still get the same error message at amount field.

  • Suggested answer
    Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    Hi,

    I have observed this.

    In General Journal importing using Configuration Package, remove the Validate trigger check mark on the TABLE FIELDS.

    First try only with amount and fill in only the minimum fields required.

    If you still have issues then remove trigger for some fields and then you will need to manually validate the entry.

    I'm pretty sure that this will resolve your errors.

  • TeddyH Profile Picture
    TeddyH 12,868 Super User 2024 Season 1 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    when you make changes to the data, BC will remove the error mark.

    when you try to apply the data again, you will get the error again.

    Try to import with little data and see if it is related to amount or not.

  • Kelvin Hew Profile Picture
    Kelvin Hew 195 on at
    RE: Config. Package Errors - Attempted to Divide by Zero

    Hi Teddy,

    The D365 BC is cloud and no customisation deploy so far.

    I found something funny, after I editing the number in the Config package screen, the error seems like disappear. Refer to screenshots below for better picture.

    1. After the data has validated

    Attempted-to-divide-by-zero-SC1.jpg

    2. I try to edit the Amount field by putting any amount. I'm using the HKD transaction in this case.

    Attempted-to-divide-by-zero-SC2.jpg

    3. Then, I select "Revert the Changes" in the error message.

    Attempted-to-divide-by-zero-SC3.jpg

    4. The Line detail with HKD seems like solved and disappeared, but I still left the other error transaction having the same error.

    Attempted-to-divide-by-zero-SC4.jpg

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans