mirror of
https://github.com/microsoft/BCQuality.git
synced 2026-10-05 06:36:55 +01:00
do not exist on the current DimensionManagement codeunit Verified against microsoft/BCApps: the real master-table validation procedure is ValidateDimValueCode (or ValidateShortcutDimValues when a DimSetID is also needed), and the real document-side inheritance procedure is GetDefaultDimID, not CreateDim. Caught from Jesper Schulz-Wedde's review thread, which had been partially hidden by GitHub's comment folding. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
28 lines
827 B
AL
28 lines
827 B
AL
table 50100 "Course"
|
|
{
|
|
fields
|
|
{
|
|
field(1; "No."; Code[20]) { }
|
|
field(10; "Global Dimension 1 Code"; Code[20])
|
|
{
|
|
CaptionClass = '1,1,1';
|
|
TableRelation = "Dimension Value".Code where(
|
|
"Global Dimension No." = const(1), Blocked = const(false));
|
|
|
|
trigger OnValidate()
|
|
var
|
|
DimMgt: Codeunit DimensionManagement;
|
|
begin
|
|
DimMgt.ValidateDimValueCode(1, "Global Dimension 1 Code");
|
|
DimMgt.SaveDefaultDim(Database::Course, "No.", FieldNo("Global Dimension 1 Code"), "Global Dimension 1 Code");
|
|
end;
|
|
}
|
|
}
|
|
|
|
trigger OnDelete()
|
|
var
|
|
DimMgt: Codeunit DimensionManagement;
|
|
begin
|
|
DimMgt.DeleteDefaultDim(Database::Course, "No.");
|
|
end;
|
|
}
|