Skip to content
  • There are no suggestions because the search field is empty.

Error 0x80131904: Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).

This error occurs when SQL Server exceeds nesting limits during cost updates, often due to circular references in assemblies.

This SQL Server error occurs when stored procedures or triggers exceed the maximum nesting level of 32. In Acctivate, this typically happens while voiding an Inventory Receipt for a lot-numbered item, especially when:

  • The lot has been used in a downstream transaction such as an Inventory Assembly, and

  • The Assembly item includes itself as a component (a circular reference), or there is a complex transaction chain requiring deep cost recalculations.

This error specifically arises in Acctivate's UpdateCOGS() function, which recalculates the cost for inventory transactions during post or void operations.

Error Message:

System.Data.SqlClient.SqlException (0x80131904): Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32).
at AcctivateApp.Acctivate.Inventory.UpdateCOGS(...)

Steps to Resolve:

  1. Identify the Lot’s Transaction Chain:
    • Open the Product Timeline or run an Inventory Report to trace all transactions tied to the lot or serial number.
    • Focus on Assemblies, Adjustments, or Transfers that occurred after the Inventory Receipt.
  2. Void Transactions in Reverse Order:
    • Start voiding the most recent transactions first.
    • Void the Inventory Assembly and any other downstream usage of the lot before attempting to void the original Inventory Receipt.
  3. Contact Acctivate Support if Necessary:
    • If you cannot identify the root issue or resolve the circular references, contact support with details about the session, item, and lot number.