A client reported an issue when updating a customer item price. (Note the Customer Inventory Maintenance form was not customized) It was taking too long to update a price. First, I check to see how many items that this customer had. It had 2778 rows. This should have not taken so long to update. I made a backup of the database and restore sample company to figure out the issue. Then I go to SQL server and check the table. It seems to be no bad data in the fields for this table. I drop the index and recreated. I ran the application again and update the price. It went into infinite loop again. Next I modified form to put debug code to trap the location where it went into infinite loop. I found the location where it went into infinite loop. I checked later versions to see if it had updated modifications on the newer versions. But it did not changed in the later versions too. So I backup the table iccprc. Then I truncated the table and inserted only that customer data back to the table. Then tried to update again and it failed. Next, I truncated the table and only inserted only a few fields to the table. This time I was able to update the table. Then we check the number of rows in SQL and it was missing one row. I put back that missing row in the form. Then I update the iccprc table with the rest of the data for those fields of that customer. Now, I update the price for that customer again and it worked. Next, I inserted the rest of the data to the table. I did a retest and it works.
Solution: This is one of those strange issues where you have no modifications to this form and it was causing issues. The problem was probably one of the rows had something bad in the field during the time I only inserted few fields to the table for a price update. Which the program deleted that row and it was able to save the record. So the problem was the data in the table for this particular customer. Which was difficult to find as the data in the fields of this table sees fine when I copy it to an excel spread sheet. I did not see anything wrong. So the solution is kind of tedious where you have to insert that set of records for that customer in question and see if it works by inserted the entire set of fields and test or some fields and test it to see if it corrected itself in the application. This solution can probably used for other ERP solution that may have a similar data issue when updating a record.