Wednesday, December 23, 2015

eConnect imports invalid Inventory Transaction causing divide by zero error when posting

By Steve Endow

I have the privilege of seeing lots of strange things in Dynamics GP.

I had a call with a customer who was having a problem posting a batch using Post Master Enterprise.  Other batches would post fine, but one batch kept failing at 97%, without any specific error message.

After resetting the batch status, we opened the batch in GP and reviewed the batch Edit List report.  No errors.  Everything looked fine.

We then attempted to post the batch within GP and at the same 97% mark, we received this error:


EXCEPTION_CLASS_SCRIPT_DIVIDE_BY_ZERO

Now we were making some progress!

The good thing about Divide by Zero errors is that you know what to look for:  A zero.

We then queried the IV10001 table and behold there was the culprit.


The QTYBSUOM field had a value of zero, while every other row had a value of 1.

Once we changed the field value to 1, the batch posted successfully.

The client imports the IV transactions with eConnect, so obviously eConnect is not validating something and is importing the record with an invalid value.

We queried the IV10001 table for other records with this issue and found several more.  All were related to the same item number, so it seems to be isolated to a single item number.

The client is going to research that item setup to try and identify the root cause.

Fun times!


Steve Endow is a Microsoft MVP for Dynamics GP and a Dynamics GP Certified IT Professional in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Google+ and Twitter






No comments: