#209 3 AL/BC patterns: Insert/Delete trigger defaults on master data and declined Confirm in OnValidate
Three new articles guide developers to use triggers when writing or deleting master data and to properly abort validations when user confirmation is declined.
- 12files
- 11AL files
- 0objects
Pull request · merged into main on 2026-10-05 by MichaelDieringer · 12 files (+289 -4), 11 AL · feature · tier official · reviewed (checked by Opus)
What changed
- Record.Insert() and Delete() skip OnInsert and OnDelete by default; use Insert(true) and Delete(true) for master tables
- Declined Confirm in OnValidate commits the new value; use Error to abort or restore xRec instead
- Articles cite exceptions: temporary records, XMLports, data migration rebuilds, and cascade deletes within the owning table
- Review skills updated with targeted checks and documented exclusions
- All fixtures verified to compile and all BCApps citations re-opened at main
AL objects touched
microsoft/knowledge/data-modeling/delete-master-data-with-trigger.bad.al: added, not in the BC? snapshot yetmicrosoft/knowledge/data-modeling/delete-master-data-with-trigger.good.al: added, not in the BC? snapshot yetmicrosoft/knowledge/data-modeling/delete-master-data-with-trigger.md: added, not in the BC? snapshot yetmicrosoft/knowledge/data-modeling/master-data-must-be-inserted-with-trigger.bad.al: added, not in the BC? snapshot yetmicrosoft/knowledge/data-modeling/master-data-must-be-inserted-with-trigger.good.al: added, not in the BC? snapshot yetmicrosoft/knowledge/data-modeling/master-data-must-be-inserted-with-trigger.md: added, not in the BC? snapshot yetmicrosoft/knowledge/error-handling/declined-confirm-must-abort-not-partially-apply.bad.al: added, not in the BC? snapshot yetmicrosoft/knowledge/error-handling/declined-confirm-must-abort-not-partially-apply.good.al: added, not in the BC? snapshot yetmicrosoft/knowledge/error-handling/declined-confirm-must-abort-not-partially-apply.md: added, not in the BC? snapshot yetmicrosoft/skills/review/al-data-modeling-review.md: modified, not in the BC? snapshotmicrosoft/skills/review/al-error-handling-review.md: modified, not in the BC? snapshot
Context
- Systems: development
Source: metadata of a merged pull request in microsoft/BCQuality (bcquality): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).