---
id: change/bcquality/158
type: change
title: "#158 3 AL/BC patterns from CURABIS's internal automated-testing training material"
summary: Four new AL/BC best practice patterns were added covering item ledger entry document numbers after combined posting and three testing approaches for verifying field UI state and generating unique test values.
tier: official
language: en
tags:
  - feature
  - main
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-08T02:03:57.446Z"
  flags: []
generated:
  at: "2026-10-08T01:26:53.141Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: 186691f815c288a06cd538075729e98dc5469013
evidence:
  - kind: code
    url: https://github.com/microsoft/BCQuality/pull/158
    title: "microsoft/BCQuality#158: 3 AL/BC patterns from CURABIS's internal automated-testing training material"
    date: "2026-09-29"
    commit: 186691f815c288a06cd538075729e98dc5469013
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
number: 158
repo: microsoft/BCQuality
source_id: bcquality-prs
url: https://github.com/microsoft/BCQuality/pull/158
kind: pr
base_branch: main
major: null
merged_at: "2026-09-29T10:49:11Z"
author: MichaelDieringer
author_type: User
community_contribution: false
labels: []
change_class: code
change_kind: feature
behavior_change: false
breaking: false
files:
  count: 14
  additions: 255
  deletions: 3
  al: 14
apps: []
objects_touched: []
objects_unjoined:
  - path: microsoft/knowledge/data-modeling/item-ledger-entry-document-no-follows-last-shipping-no.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/data-modeling/item-ledger-entry-document-no-follows-last-shipping-no.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/data-modeling/item-ledger-entry-document-no-follows-last-shipping-no.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-generateguid-for-unique-test-fixture-values.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-generateguid-for-unique-test-fixture-values.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-generateguid-for-unique-test-fixture-values.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-testpage-editable-to-verify-field-editability.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-testpage-editable-to-verify-field-editability.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-testpage-editable-to-verify-field-editability.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-testpage-visible-enabled-to-verify-field-ui-state.bad.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-testpage-visible-enabled-to-verify-field-ui-state.good.al
    status: added
    reason: not-in-snapshot
  - path: microsoft/knowledge/testing/use-testpage-visible-enabled-to-verify-field-ui-state.md
    status: added
    reason: not-in-snapshot
  - path: microsoft/skills/review/al-data-modeling-review.md
    status: modified
    reason: not-in-snapshot
  - path: microsoft/skills/review/al-testing-review.md
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items: []
systems:
  - development
quote: null
joined_against:
  major: null
  commit: null
---

# #158 3 AL/BC patterns from CURABIS's internal automated-testing training material

> Four new AL/BC best practice patterns were added covering item ledger entry document numbers after combined posting and three testing approaches for verifying field UI state and generating unique test values.

[Pull request](https://github.com/microsoft/BCQuality/pull/158) · merged into `main` on 2026-09-29 by MichaelDieringer · 14 files (+255 -3), 14 AL · feature · tier official · reviewed (checked by Opus)

## What changed

- Item Ledger Entry carries the shipment's document number, not the invoice number, after combined Ship and Invoice posting of sales orders
- Use TestPage field .Visible()/.Enabled() to verify UI rendering state and .Editable() via OpenEdit() for editability verification
- Generate test fixture values with GenerateGUID() for full-length fields or GenerateRandomCodeWithLength/GenerateRandomCode20 when uniqueness must be verified
- Four atomic AL-specific patterns documented with good/bad code examples from CURABIS internal training material
- Patterns cover data modeling and testing domains with best practices and anti-patterns

## AL objects touched

- `microsoft/knowledge/data-modeling/item-ledger-entry-document-no-follows-last-shipping-no.bad.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/data-modeling/item-ledger-entry-document-no-follows-last-shipping-no.good.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/data-modeling/item-ledger-entry-document-no-follows-last-shipping-no.md`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-generateguid-for-unique-test-fixture-values.bad.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-generateguid-for-unique-test-fixture-values.good.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-generateguid-for-unique-test-fixture-values.md`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-testpage-editable-to-verify-field-editability.bad.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-testpage-editable-to-verify-field-editability.good.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-testpage-editable-to-verify-field-editability.md`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-testpage-visible-enabled-to-verify-field-ui-state.bad.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-testpage-visible-enabled-to-verify-field-ui-state.good.al`: added, not in the BC? snapshot yet
- `microsoft/knowledge/testing/use-testpage-visible-enabled-to-verify-field-ui-state.md`: added, not in the BC? snapshot yet
- `microsoft/skills/review/al-data-modeling-review.md`: modified, not in the BC? snapshot
- `microsoft/skills/review/al-testing-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).
