community postSales & Receivablescommunity - not Microsoftreviewed - checked by Opus

BC Friday Tips #57 Use TestStatusOpen Procedure

When adding new fields to Sales or Purchase documents in Business Central, use the TestStatusOpen procedure during validation to ensure fields cannot be edited after the document is released. This prevents accidental changes to important order data and maintains workflow consistency.

post That NAV Guy

Teddy Herryanto · 2025-11-21 · 101 words · about 1 min

"Use the TestStatusOpen procedure when you validate your new fields. It gives you a standard check on document status."

Key points

  • TestStatusOpen procedure provides a standard check to validate document status before allowing field edits
  • Released Sales Orders lock documents and prevent editing of important fields like Shipment Method Code
  • Using TestStatusOpen when validating new fields prevents inconsistent field behavior across documents
  • Protects workflow accuracy by enforcing edit restrictions on released documents

Quotes

  • “Use the TestStatusOpen procedure when you validate your new fields. It gives you a standard check on document status.” (It provides the recommended method for validating field editability based on document release status)
  • “A released Sales Order locks the document for processing.” (Understanding document locking behavior is essential when adding custom fields that should respect this constraint)

AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

  • other “TestStatusOpen”

Context

  • Features: TestStatusOpen procedure, field validation, document status checking, order locking

Source: That NAV Guy, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.