Can't close a works order NULL value itemdbkey error

SUGGESTED

Been puzzling over this for a couple of days now. 

We have a completed works order that cant be closed due to an error that comes up saying:

  • Cannot update Field (itemDBKey) with a Null value as it is marked as not accepting 'Null' values. 

I did get this on a different Works Order, but I managed to fix it due to the warehouse information not being there. But this WO seems to be different 

The only reference to itemDBKey is in the MFGRepTraceabilityEnquiry table, but that doesn't seem to have much listed (unless its linked to another table) 

Anyone experience this before and can explain what is causing this? 

  • 0

    The field name reported by the exception refers to the field that is defined in the object (i.e. in the Sage 200 program), and it doesn't always follow that the column name in the database is the same. For example the PersistentBinItem object (that being the object that maps to a row in the BinItem table) has a field called ItemDbKey. The column in the database, however, is called ItemID. 

    Your best bet here is to get either SQL Server Extended Events or Profiler running and replicate the error; then you'd get an idea of what SQL statement was attempting to update/insert a row with a NULL value. It'll be a bit needle-in-a-haystack otherwise.

  • 0
    SUGGESTED

    Hi Derrick

    I agree with the previous advice given, I would also recommend reaching out to your Sage 200 support provider for assistance in this matter if you haven't already done so.

    This is not a particularly common error especially in relation to works orders, so I was unable to find any previously suggested solutions in that area.

    I did find information on the same error with the BOM reverse build function caused by the built stock item's product group having 'Keep Movement History' unticked. However, I have been unable to replicate the problem with the limited testing I have performed in this area.

    Regards

    Chris