bcquality/microsoft/skills/review
Michael Dieringer 4cd53eac64
knowledge(events): database trigger setup flags may only be set to true (#213)
* knowledge(events): database trigger setup flags may only be set to true

Add an events article with compiled good/bad samples:
GetDatabaseTableTriggerSetup (Global Triggers) and
OnAfterGetDatabaseTableTriggerSetup (GlobalTriggerManagement) share four
var Booleans across all subscribers, which run in no particular order.
Assigning false, or a lookup result without or-ing in the current value,
clears flags other features set (Dataverse sync, API webhooks, data
archive, and, for direct Global Triggers subscribers, the change log).
Recommends the codeunit 49 integration events per Learn's guidance on
system codeunits 2000000001..2000000010 and handler-side table filtering.

Wired into al-events-review tokens and an event-design check, with
carve-outs for conditional := true, Flag := Flag or ..., and the no-op
"if not Flag then Flag := false" found in BCApps. Registered in the
events review-fixtures override.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* knowledge(events): address review of database trigger setup flags article

- Name the BCApps code that clears flags (demo data tool W1/CZ/IN,
  Backup Management test library) as the mechanism in demo/test-only
  sessions; carve such code out of the al-events-review check.
- Label "events are raised only when the flag is true" as inferred and
  cite the supporting sources (Learn integration-record refactoring on
  disabled bulk SQL operations, ChangeLog test cache comment,
  No Transactions Subscriber); fold the bulk-SQL cost into Best Practice.
- Drop the "handler without opt-in" signal from article and check.
- Qualify change log protection as normal execution context only.
- Drop the unverifiable codeunit ID; describe Global Triggers by its
  2000000001..2000000010 range and mark the transition page as v14-era.
- Order-dependent wording for flag overwrites; add GP and
  No Transactions as further direct subscribers; link the references.

Samples rechecked with alc 30.0 against Base Application 28.4 symbols.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 14:59:53 +02:00
..
al-appsource-review.md 18 more AL/BC patterns: data-modeling, testing, style, security, error-handling, ui, upgrade, web-services, appsource (#157) 2026-09-29 17:12:51 +02:00
al-breaking-changes-review.md 18 AL/BC patterns: style, data-modeling, web-services, appsource, breaking-changes, performance, testing (#156) 2026-09-29 12:48:17 +02:00
al-code-review.md Validate composed reviews against the expected leaf worklist (#204) 2026-10-02 10:27:27 +02:00
al-data-modeling-review.md 3 AL/BC patterns: Insert/Delete trigger defaults on master data and declined Confirm in OnValidate (#209) 2026-10-05 14:46:27 +02:00
al-error-handling-review.md 3 AL/BC patterns: Insert/Delete trigger defaults on master data and declined Confirm in OnValidate (#209) 2026-10-05 14:46:27 +02:00
al-events-review.md knowledge(events): database trigger setup flags may only be set to true (#213) 2026-10-05 14:59:53 +02:00
al-finance-review.md Add source-verified Finance knowledge and review domain (#57) 2026-09-21 10:20:41 +02:00
al-interfaces-review.md Add foundational AL developer knowledge (#195) 2026-09-21 10:15:39 +02:00
al-performance-review.md knowledge(performance): grouped query (Count + ColumnFilter = HAVING) for distinct values and duplicates (#215) 2026-10-05 14:59:15 +02:00
al-privacy-review.md Add bounded knowledge retrieval (#179) 2026-09-11 12:35:31 +02:00
al-query-review.md Add query filter semantics guidance (#186) 2026-09-15 12:51:15 +02:00
al-reporting-review.md Add reporting review guidance and evaluation fixtures (#183) 2026-09-15 10:38:32 +02:00
al-scm-review.md Strengthen review contracts and add AL reliability guidance (#196) 2026-09-29 13:03:39 +02:00
al-security-review.md 18 more AL/BC patterns: data-modeling, testing, style, security, error-handling, ui, upgrade, web-services, appsource (#157) 2026-09-29 17:12:51 +02:00
al-style-review.md knowledge(style): a new procedure that changes the page's current record should take it as var Record (#216) 2026-10-05 14:42:22 +02:00
al-telemetry-review.md Add bounded knowledge retrieval (#179) 2026-09-11 12:35:31 +02:00
al-testing-review.md 3 AL/BC testing patterns from an external BC testing expert's blog (Luc van Vugt, fluxxus.nl) (#159) 2026-09-29 17:13:06 +02:00
al-ui-review.md 2 AL/BC UI patterns: client-expression in-list (AL0573) and Role Center AccessByPermission (#207) 2026-10-02 09:53:14 +02:00
al-upgrade-review.md knowledge(upgrade): upgrade code must not use ChangeCompany (#210) 2026-10-02 11:35:11 +02:00
al-web-services-review.md 18 more AL/BC patterns: data-modeling, testing, style, security, error-handling, ui, upgrade, web-services, appsource (#157) 2026-09-29 17:12:51 +02:00