Implementing Required Field Validation: Ensuring Data Completeness
Introduction
Incomplete data is one of the most common and costly data quality problems in Microsoft Dynamics 365 Business Central and other business systems. Missing customer addresses delay shipments. Blank GL account codes prevent posting. Missing sales order dates disrupt scheduling. Empty vendor contacts frustrate purchasing teams. The impact ripples through every business process.
The cost of missing required fields:
Operational delays: Transactions cannot complete, work stops, follow-up required
Data quality decay: Incomplete records are never fixed, accumulating over time
Downstream failures: Later processes fail due to missing upstream data
User frustration: "Why didn't someone tell me this was required?"
Manual cleanup costs: Database cleanup projects, data quality initiatives
Compliance risks: Regulatory requirements not met, audit findings
Traditional approaches rely on field properties (Required=Yes in table design), user training ("remember to fill in all fields"), and periodic cleanup. These reactive methods fail because:
Table-level required fields can't be conditional ("required only if...")
Users bypass required fields with placeholder data ("N/A", "TBD", "000")
Cleanup is expensive and never catches up with new problems
Business rules provide intelligent required field enforcement: Conditional requirements based on context, clear error messages explaining why fields are required, validation at the right time in the process, and flexibility to handle exceptions—all while maintaining data integrity.
This comprehensive guide covers required field strategy, implementing basic and conditional requirements, contextual validation patterns, handling temporal requirements, providing helpful error messages, balancing strictness with usability, and practical examples across all business domains.
Understanding Required Field Categories
Always Required (Unconditional)
Fields essential for Business Central system operation:
Characteristics:
Required in 100% of cases
No exceptions
System cannot function without them
Usually enforced at table level
Conditionally Required (Context-Dependent)
Fields required only in specific situations:
Characteristics:
Required depends on other field values, transaction type, or business context
Cannot be enforced at table level (too rigid)
Perfect use case for business rules
Business Policy Required (Compliance/Best Practice)
Fields required by business policy, not system necessity:
Characteristics:
Required by company policy, regulation, or best practice
System could technically function without them
Missing data causes business problems, not system errors
Workflow-Stage Required (Process-Dependent)
Fields required at specific stages of a process:
Characteristics:
Requirements change as record progresses through workflow
Same field optional at one stage, required at another
Rules trigger based on status/stage transitions
Required Field Validation Strategy
When to Validate
On field entry (immediate):
On record save (before insert):
On status change (workflow transition):
Before posting/release (final validation):
Validation Timing Matrix
Field Type | Validate On Entry | Validate On Save | Validate On Status Change | Validate Before Post |
|---|---|---|---|---|
Always Required | ✓ | ✓ | - | - |
Conditionally Required | - | ✓ | - | ✓ |
Business Policy | - | ✓ | - | - |
Workflow-Stage | - | - | ✓ | - |
Error Message Quality
Poor error message:
Better error message:
Best error message:
Implementation: Basic Required Field Validation
⚠️ CRITICAL: Understanding When Data Exists
Why OnInsert Doesn't Work for Required Fields:
When a customer record is created (OnInsert), Business Central:
Assigns the Customer No. automatically
Creates the record with ONLY the No. field populated
Triggers the OnInsert event
User then fills in Name, Address, Payment Terms, etc. (via OnModify)
If you validate required fields OnInsert, the validation fails because those fields don't exist yet!
Correct Approach: Validate when user activates the customer (unblocks) after filling in all data.
Pattern 1: Simple Required Fields (Status-Based Validation)
Placeholders Used in This Pattern:
[18:39]- Customer (Table 18): Blocked (Field 39) - Status field (blank = unblocked/active){18:39}- Customer (Table 18): Blocked (Field 39) - Old value before change[18:2]- Customer (Table 18): Name (Field 2) - Customer's legal name[18:35]- Customer (Table 18): Country/Region Code (Field 35) - ISO country code[18:27]- Customer (Table 18): Payment Terms Code (Field 27) - Payment terms (NET30, etc.)[18:21]- Customer (Table 18): Customer Posting Group (Field 21) - GL account posting group
Why This Pattern Works:
Real-world workflow: Users create customer → Fill in fields → Unblock when ready
Data exists: By the time user unblocks, they've filled in Name, Address, Payment Terms
Status indicates readiness: Unblocking means "this customer is ready for transactions"
Change detection: Scenario 1 ensures we only trigger when Blocked field actually changes
Activation validation: Scenario 2 ensures we only validate when activating (not when blocking)
Alternative Status Fields: If your customer table has a custom Status field instead of Blocked:
Pattern 2: Contact Information Requirements
Placeholders Used in This Pattern:
[18:102]- Customer (Table 18): E-Mail (Field 102) - Customer's email address[18:103]- Customer (Table 18): Phone No. (Field 103) - Customer's phone number[18:1]- Customer (Table 18): No. (Field 1) - Customer number[18:2]- Customer (Table 18): Name (Field 2) - Customer name
Rule 2: Email Required for Electronic Invoice Customers Scenario 1: [18:CustomInvoiceDelivery] is 'Electronic' Scenario 2: [18:102] is '' // Invoice delivery set to electronic but no email
Action: Error - "Email address required for electronic invoice delivery.
Customer: [18:2] Invoice Delivery Method: Electronic
Cannot deliver invoices electronically without email address.
Options:
Enter valid email address for invoice delivery
Change Invoice Delivery Method to:
'Print' (mail physical invoices)
'Portal' (customer retrieves from web portal)
Electronic delivery is fastest and most cost-effective when email is available."
Rule 3: Phone Required for Will-Call/Pickup Customers Scenario 1: [18:CustomShippingMethod] is 'WILL-CALL' Scenario 2: [18:103] is '' // Shipping method is will-call but no phone
Action: Error - "Phone number required for Will-Call customers.
Customer: [18:2] Shipping Method: Will-Call (Customer Pickup)
Phone number required to notify customer when order is ready for pickup.
Enter: ☐ Primary Phone Number ☐ Mobile Phone (optional, for SMS notifications)
Will-Call customers must be contactable to arrange pickup times and confirm order readiness."
Rule Set: SALES-CONDITIONAL-REQUIRED Trigger Table: 36 (Sales Header) Trigger Field: [36:0] // Any field - check whenever order created or modified Trigger Event: Before Insert, Before Modify Linked Tables: Customer (18)
Rule 1: Ship-to Address Required (Different Customer) Scenario 1: [36:13] is <>[36:2] Scenario 2: [36:13] is <>'' Scenario 3: [36:CustomShipToAddress] is '' // Ship-to Customer differs from Sell-to Customer but ship-to address blank
Action: Error - "Ship-to Address required when shipping to different customer.
Order: [36:3] Sell-to Customer: [36:2] ([SellToName]) Ship-to Customer: [36:13] ([ShipToName])
When Ship-to Customer differs from Sell-to Customer, complete ship-to address is required for shipping and delivery.
Required fields: ☐ Ship-to Address ☐ Ship-to City ☐ Ship-to State/Province ☐ Ship-to ZIP/Postal Code ☐ Ship-to Country/Region
Or change Ship-to Customer to [36:2] if items ship to sell-to customer location."
Rule 2: Export Documentation Required (International Orders) Scenario 1: [18:35] is <>'US' Scenario 2: [36:CustomExportLicenseNo] is '' // Customer country is not US but export license not specified
Action: Error - "Export documentation required for international orders.
Customer: [18:2] Country: [18:35] Order Amount: $[36:109]
International orders require export compliance documentation.
Required: ☐ Export License No. (if controlled items) ☐ Harmonized Tariff Code ☐ Country of Origin ☐ Export Terms (Incoterms)
Contact Export Compliance at ext. 8000 for:
Export license requirements
Restricted country screening
Documentation preparation
Cannot proceed with international order without export compliance clearance."
Rule 3: Payment Reference Required (Prepay/COD Orders) Scenario 1: [36:CustomPaymentMethod] is 'PREPAY'|'COD' Scenario 2: [36:CustomPaymentReference] is '' // Payment method requires upfront payment but no payment reference
Action: Error - "Payment reference required for prepay/COD orders.
Customer: [18:2] Payment Method: [36:CustomPaymentMethod] Order Amount: $[36:109]
Orders with [36:CustomPaymentMethod] payment method require payment before fulfillment. Enter payment reference information.
For PREPAY: ☐ Prepayment Check No. or ☐ Wire Transfer Confirmation No. or ☐ Credit Card Authorization Code
For COD: ☐ COD Amount Authorized ☐ Collection Instructions
Payment must be verified before order can be released to warehouse."
Rule 4: Project Code Required (Project-Based Business) Scenario 1: [18:CustomRequiresProject] is true Scenario 2: [36:CustomProjectCode] is '' // Customer requires project code but not specified
Action: Error - "Project Code required for this customer.
Customer: [18:2] (Project-based customer) Order: [36:3]
Customer [18:2] is flagged as project-based customer. All orders must be associated with specific project for:
Cost tracking and job costing
Invoice consolidation
Revenue recognition
Project profitability analysis
Select existing project or create new project code.
Contact Project Management at ext. 9000 for project code assignment if needed."
Rule Set: SALES-THRESHOLD-REQUIRED Trigger Table: 36 (Sales Header) Trigger Field: [36:109] // Amount Including VAT - trigger when amount changes Trigger Event: Before Insert, Before Modify Linked Tables: Customer (18), Salesperson (13)
Rule 1: Manager Approval Required (Large Orders) Scenario 1: [36:109] is >50000 Scenario 2: [36:CustomManagerApproval] is '' // Order over $50K but no manager approval
Action: Error - "Manager approval required for orders over $50,000.
Order: [36:3] Customer: [18:2] Order Amount: $[36:109] Approval Threshold: $50,000
Orders exceeding $50,000 require manager review and approval for:
Credit risk assessment
Pricing verification
Delivery commitment review
Resource allocation planning
Required: ☐ Manager Approval (select approving manager) ☐ Approval Date
Request approval from Sales Manager [13:CustomManager] before proceeding.
This approval requirement ensures large orders receive appropriate oversight and resource planning."
Rule 2: Credit Check Required (New High-Value Customers) Scenario 1: [18:CustomCustomerAge] is <90 Scenario 2: [36:109] is >10000 Scenario 3: [36:CustomCreditCheckDate] is '' // New customer (<90 days), high order (>$10K), no credit check
Action: Error - "Credit check required for large orders from new customers.
Customer: [18:2] (Account age: [18:CustomCustomerAge] days) Order Amount: $[36:109] Credit Check Status: Not performed
Policy: New customers (less than 90 days) placing orders over $10,000 require credit verification before order approval.
Required: ☐ Credit Check Completion Date ☐ Credit Score/Rating ☐ Approved Credit Limit
Contact Credit Department at ext. 3000 to:
Run credit bureau report
Verify business references
Establish appropriate credit limit
This protects company from bad debt risk on large orders from new customers."
Rule 3: Discount Justification Required (High Discounts) Scenario 1: [36:CustomAverageDiscount] is >25 Scenario 2: [36:CustomDiscountReason] is '' // Average discount over 25% but no justification
Action: Error - "Discount justification required for discounts exceeding 25%.
Order: [36:3] Average Discount: [36:CustomAverageDiscount]% Justification: (blank)
Discounts over 25% require documented business justification for:
Margin protection review
Pricing policy compliance
Management reporting
Audit trail
Select discount reason: ☐ Volume Discount (quantity-based) ☐ Competitive Match (competitor pricing) ☐ Customer Loyalty/Retention ☐ Promotional Campaign ☐ Clearance/Obsolete Inventory ☐ Strategic Account (approved exception) ☐ Other (specify in comments)
Document reason for discount to ensure pricing discipline and accountability."
Rule Set: SALES-ORDER-STATUS-REQUIREMENTS Trigger Table: 36 (Sales Header) Trigger Event: Before Modify (Status Change) Linked Tables: Customer (18)
Rule 1: Release Requirements (Draft → Released) Condition: [36:CustomStatus] is 'Released' AND [PreviousStatus] is 'Draft' AND ([36:CustomShipToAddress] is '' OR [36:CustomRequestedDeliveryDate] is '' OR [36:CustomShippingMethod] is '') // Status changing to Released but required fields missing
Action: Error - "Cannot release order: Required fields missing.
Order: [36:3] Current Status: Draft Attempting: Release
To release order for fulfillment, complete all required fields:
☐ Ship-to Address: [36:CustomShipToAddress] ☐ Requested Delivery Date: [36:CustomRequestedDeliveryDate] ☐ Shipping Method: [36:CustomShippingMethod]
Warehouse cannot process order without complete shipping information.
Complete all fields or keep status as 'Draft' for continued editing."
Rule 2: Approval Requirements (Pending → Approved) Condition: [36:CustomStatus] is 'Approved' AND [PreviousStatus] is 'Pending Approval' AND ([36:CustomApprovedBy] is '' OR [36:CustomApprovalDate] is '') // Status changing to Approved but approval fields not filled
Action: Error - "Approval documentation required.
Order: [36:3] Status Change: Pending Approval → Approved
To mark order as approved, document approval:
☐ Approved By: [36:CustomApprovedBy] (select approving user) ☐ Approval Date: [36:CustomApprovalDate] (date of approval) ☐ Approval Comments: [36:CustomApprovalComments] (optional)
Approval audit trail is required for compliance and future reference.
If approval is not complete, keep status as 'Pending Approval'."
Rule 3: Credit Hold Release Requirements Condition: [18:CustomCreditHold] is false AND [PreviousCreditHold] is true AND [18:CustomCreditHoldReleaseReason] is '' // Credit hold being removed but no release reason documented
Action: Error - "Credit hold release requires documented reason.
Customer: [18:2] Status Change: Credit Hold → Active
Removing credit hold requires documentation:
☐ Release Reason (why hold is being removed):
Payment received
Credit limit increased
Payment plan established
Management override
Other (specify)
☐ Authorized By: [18:CustomCreditHoldReleasedBy] ☐ Release Date: [18:CustomCreditHoldReleaseDate]
Credit hold management requires complete audit trail. Document reason for removing hold before proceeding."
Rule Set: JOURNAL-POSTING-REQUIREMENTS Trigger Table: 81 (Gen. Journal Line) Trigger Field: [81:0] // Any field Trigger Event: Before Insert, Before Modify Linked Tables: G/L Account (15)
Rule 1: Dimension Requirements Scenario 1: [15:CustomRequiresDimension1] is true Scenario 2: [81:CustomDimension1] is '' // Account requires dimension but not specified
Action: Error - "Dimension required for this account.
G/L Account: [15:3] - [15:1] Amount: $[81:13]
Account [15:3] requires Dimension 1 (Department) for all postings to enable:
Departmental P&L reporting
Cost center tracking
Budget variance analysis
Select Department from dimension list:
100: Sales
200: Marketing
300: Operations
400: Finance
500: IT
If this is corporate overhead not assignable to specific department, use '900 - Corporate'.
Cannot post without dimension assignment."
Rule 2: External Document No. Required (Vendor Payments) Scenario 1: [81:5] is 'Payment' Scenario 2: [81:8] is 'Vendor' Scenario 3: [81:CustomExternalDocNo] is '' // Payment to vendor but no external document number
Action: Error - "External Document No. required for vendor payments.
Vendor: [Vendor Name] Amount: $[81:13] Payment Date: [81:5]
External Document No. (check number, wire confirmation, ACH trace number) is required for vendor payments for:
Payment reconciliation
Vendor inquiry response
Audit trail
Duplicate payment prevention
Enter: ☐ Check Number (if check payment) ☐ Wire Transfer Confirmation (if wire) ☐ ACH Trace Number (if ACH/EFT) ☐ Credit Card Transaction ID (if card)
Cannot post payment without external document reference."
Rule 3: Reason Code Required (Adjusting Entries) Scenario 1: [81:CustomEntryType] is 'Adjusting Entry' Scenario 2: [81:CustomReasonCode] is '' // Adjusting entry but no reason code
Action: Error - "Reason Code required for adjusting entries.
Account: [15:3] Amount: $[81:13] Description: [81:7]
Adjusting entries require documented business justification through reason codes:
Select appropriate reason: ☐ Accrual Adjustment ☐ Depreciation ☐ Reclassification ☐ Error Correction ☐ Period-End Close ☐ Audit Adjustment ☐ Other (specify in description)
Reason codes ensure adjusting entries are properly documented and auditable.
Add detailed explanation in Description field if reason is not self-evident."
WHAT: Which field is missing "Ship-to Address is required"
WHY: Why it's required (business context) "Complete shipping address needed for delivery and logistics"
WHEN: Under what conditions (if conditional) "Required when Ship-to Customer differs from Sell-to Customer"
CONSEQUENCES: What happens if not provided "Warehouse cannot process order without shipping address"
WHAT TO ENTER: Specific guidance "Enter Ship-to Address Line 1, City, State, ZIP Code"
ALTERNATIVES: Other ways to proceed (if any) "Or change Ship-to Customer to match Sell-to Customer"
WHO TO CONTACT: Escalation path "Contact Order Processing at ext. 5500 for assistance"
Poor Message: "Required field missing"
Better Message: "Ship-to Address required"
Best Message: "Ship-to Address required for orders with different ship-to customer.
WHY: This order ships to [ShipToCustomer] which is different from bill-to customer [BillToCustomer]. Complete shipping address is needed for:
Accurate delivery to correct location
Shipping cost calculation
Carrier label generation
Delivery confirmation
WHAT TO ENTER: ☐ Ship-to Address Line 1 ☐ Ship-to City ☐ Ship-to State/Province Code ☐ Ship-to ZIP/Postal Code ☐ Ship-to Country/Region Code
Current values: Address: [CurrentAddress] ← MISSING City: [CurrentCity] ← MISSING State: [CurrentState] ← MISSING
ALTERNATIVE: If items should ship to bill-to customer location, change Ship-to Customer Code to [BillToCustomer] to use bill-to address automatically.
NEED HELP? Contact Order Processing at ext. 5500 or orderteam@company.com"
Null vs. Blank vs. Zero
Null: Not set
Blank: "" (empty string)
Zero: 0 (numeric)
Ensure rule handles all appropriately
Whitespace
Field contains only spaces
Should be treated as blank
Special Characters
Field contains special placeholder like "-" or "N/A"
Decide: Allow or block?
Minimum Length
Field has value but too short to be valid
Example: Phone "555" (not complete)
Format Validity
Field has value but wrong format
Example: Email "notanemail" (no @)
Different from "required" validation
Case Sensitivity
"value" vs. "VALUE" vs. "Value"
Ensure comparison handles correctly
Dependency Chains
Field A required if Field B filled
Field B required if Field C filled
Test full chain
Circular Dependencies
Field A required if B blank
Field B required if A blank
Avoid creating impossible scenarios
Poor: 50 required fields all at once Result: User frustrated, enters bad data to get past validation
Better: Required fields in stages
Creation: Minimal fields (Name, Code)
Before first use: Additional fields (Contact, Address)
Before posting: Complete fields (All financial data)
Result: User can save work in progress, complete fields when information available
Poor: "Error" Poor: "Required field missing" Better: "Customer Name is required" Best: "Customer Name is required for all customers for identification on invoices and reports. Enter customer's legal business name or individual name."
Truly required (Error):
System cannot function without it
Legal/compliance mandate
Creates serious business problems if missing
Recommended (Warning):
Best practice but not mandatory
Valuable but not critical
Can be added later if needed
Example: Required: Customer Name (must have) Recommended: Customer Email (should have, but not critical)
Approach: Accept "TBD", "PENDING", "TO BE DETERMINED" during draft stage But: Require real values before status change to Released/Approved/Posted
Implementation: Rule 1 (Draft): Allow TBD Rule 2 (Before Release): Block if still TBD
In error message, show: ✓ Which field is missing ✓ What format/type of data to enter ✓ Examples of valid values ✓ Where to find the information ✓ Who to contact for help
Sales Order Example: User workflow:
Create order with customer (save)
Add lines with items (save)
Confirm pricing with customer (save)
Get shipping details from customer
Complete shipping address (save)
Release order
Validation strategy:
Step 1-5: Allow incomplete shipping address (status = Draft)
Step 6: Require complete shipping address (before Release)
Result: User can save work at each step, only blocked when trying to release
Track:
How often each required field error triggers
Which fields users most often leave blank
User feedback on error message clarity
Workarounds users employ (placeholder data)
Refine:
Adjust message wording based on user questions
Add more helpful guidance if frequently asked
Reconsider if field truly required (high error rate but low value)
Add data entry shortcuts for common values
Before Required Field Validation:
Incomplete customer records: 23%
Orders delayed due to missing shipping info: 45/month
Journal entries rejected at posting: 78/month
Data cleanup projects: Quarterly, 40 hours each
After Required Field Validation:
Incomplete customer records: 3% (work-in-progress only)
Orders delayed: 5/month (85% reduction)
Journal entries rejected: 8/month (90% reduction)
Data cleanup projects: Annual review only, 4 hours
Annual savings: $85K in reduced rework, faster processing, fewer errors
Business Central
>
Triggering Power Automate Flows from Business Rules
>
Advanced Table Linking and Cross-Record Validation
>
Aggregate Calculations Across Related Records: Summing, Counting, and Analyzing Data
>
Automated Email Notifications from Business Rules
>
Automatically Setting Field Values with Assign Actions
>
Building an Approval Workflow: When Orders Need Manager Sign-Off
>
Building Commission Calculation Rules for Sales Teams: Automating Sales Incentives
>
Building Multi-Condition Validation Rules: Understanding Independent Condition Evaluation
>
Construction and Project-Based Industry Solutions
>
Creating Your First Business Rule: A Step-by-Step Beginner's Guide
>
Custom Validation Messages for Business Rules
>
Distribution and Logistics Industry Solutions
>
Energy and Utilities Industry Solutions
>
Financial Services Industry Solutions
>
Food and Beverage Industry Solutions
>
Government and Public Sector Procurement Solutions
>
Healthcare and Medical Supply Industry Solutions
>
How to Implement Credit Limit Validation in 10 Minutes
>
How to Link Multiple Tables for Complex Multi-Table Validation
>
How to Prevent Infinite Loops in Your Business Rules
>
How to Prevent Negative Inventory with Business Rules
>
How to Validate Customer Data Before Order Creation
>
Implementing Discount Authorization Rules: Control Pricing with Confidence
>
Implementing Required Field Validation: Ensuring Data Completeness
>
Interactive Confirmation Dialogs in Business Rules
>
Manufacturing Industry Solutions
>
Non-Profit and Grant Management Solutions
>
Performance Optimization for Business Rules
>
Pharmaceuticals and Life Sciences Solutions
>
Preventing Data Entry Errors: Validation Best Practices
>
Professional Services Industry Solutions
>
Real Estate and Property Management Solutions
>
Retail and Point-of-Sale Industry Solutions
>
Rule Groups and User Permissions: Controlling Who Gets Which Rules
>
Rule Set Organization and Maintenance
>
Rule Versioning and Change Management
>
Testing and Debugging QUALIA Business Rules
>
Transportation and Logistics Industry Solutions
>
Understanding the Rule Execution Pipeline: From Trigger to Action
>
Understanding Validation Scenarios and Timing
>
Using Old Value Placeholders for Change Detection and Validation
Related Posts
Understanding the Rule Execution Pipeline: From Trigger to Action
QUALIA Rule Engine operates as a sophisticated event-driven system that intercepts data changes in Business Central and evaluates configured business rules in real-time. Understanding the execution pipeline—how a database operation flows through trigger detection, scenario evaluation, condition processing, and action execution—is essential for advanced rule design, performance optimization, and troubleshooting.
Energy and Utilities Industry Solutions
Energy and utilities companies face complex regulatory requirements including FERC compliance, NERC reliability standards, environmental regulations, rate case filings, renewable energy credit tracking, interconnection agreements, demand response programs, and outage management protocols. Asset-intensive operations with critical infrastructure, regulatory cost recovery mechanisms, time-of-use pricing structures, and customer meter-to-cash processes demand automated validation beyond standard ERP capabilities.
Real Estate and Property Management Solutions
Real estate and property management companies require specialized business rules for lease administration, tenant billing, common area maintenance (CAM) reconciliation, security deposit tracking, maintenance workflow management, vacancy management, rent escalation calculations, and portfolio performance analysis. Multi-entity property ownership structures, percentage rent calculations, operating expense recoveries, lease abstraction accuracy, and compliance with lease accounting standards (ASC 842 / IFRS 16) demand automated validation beyond standard ERP capabilities.
