bcquality/microsoft
Michael Dieringer 80cf96557f Stop routing GenerateRandomCode20 as compliant for shorter fields
al-testing-review.md's cue presented GenerateRandomCodeWithLength and
GenerateRandomCode20 as interchangeable options for "a shorter field
needing real verified uniqueness." They aren't: verified against
LibraryUtility.Codeunit.al, GenerateRandomCode20 truncates
GenerateGUID()'s sequential value down to the target field's length by
keeping the leftmost (slowest-changing) characters via PadStr, so its
retry loop against a field shorter than 20 can churn through the same
truncated prefix for a long time. GenerateRandomCodeWithLength has no
such problem (it generates exactly the requested length of random
text). The knowledge article itself already scoped GenerateRandomCode20
to Code[20] correctly - only the skill cue needed narrowing to match.
2026-09-22 14:29:51 +02:00
..
knowledge Fix remaining correctness issues from Jesper's 2026-09-15 re-review 2026-09-21 22:35:42 +02:00
skills Stop routing GenerateRandomCode20 as compliant for shorter fields 2026-09-22 14:29:51 +02:00