A little background: We develop a system that connects to Business Central and pulls data from the database, either by directly accessing the database or via API/Webservices.
The biggest table we are pulling is the [Item Ledger Entry] table. This is usually a HUGE table so we fetch it daily and only fetch what has been added since we last fetched it (by using max(Entry No)).
One of the columns in the item ledger is the item no. and it seems to be possible for BC users to change an item no, which results in BC changing the whole item ledger table and updating the item no. When this happens we need to update the table on our side accordingly but the problem is that we are not aware of this change since we are only incrementally fetching the item ledger. Is there any way to detect these changes in BC?
             
            
              
              
              
            
            
           
          
            
            
              My first question would be why are users changing item numbers?  That would seem to point to possible business process issues. Don’t turn that into a technical issue.
In regards to finding the changed records, you could leverage the OnAfterModifyEvent of the table.  Use it to record the record’s “Entry No.” into a staging table. You could include logic to only record those records where fields you need are changed.  Continue to use your current process to get new records. Then use this staging table to get the changed record.
             
            
              
              
              
            
            
           
          
            
            
              Thank you for the info.
I agree that users changing item numbers seems a bit “sketchy” but we don’t really have any control over that matter since we are a 3rd party company.
Just to iterate, we are not NAV/BC developers, we are only connecting to the ERP database (using a generic connector) to fetch data so we don’t really have any input into the setup of the system. If there was a way to monitor item no changes without having to implement custom logic, that would be nice, but perhaps unrealistic?