Skip to content

Commit

Permalink
CalcFields fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TKapitan committed Feb 16, 2022
1 parent e345913 commit 7e7c0b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions App/Src/Extensions/ExtensionObject.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ table 80003 "C4BC Extension Object"

trigger OnValidate()
begin
Rec.TestField("Assignable Range Code");
Rec.CalcFields("Assignable Range Code", "Alternate Assign. Range Code");
Rec.TestField("Assignable Range Code");

"Object ID" := GetNewObjectID(Rec."Assignable Range Code", false);
if Rec."Alternate Assign. Range Code" <> '' then
Expand All @@ -44,8 +44,8 @@ table 80003 "C4BC Extension Object"
trigger OnValidate()
begin
Rec.TestField("Object ID");
Rec.TestField("Assignable Range Code");
Rec.CalcFields("Assignable Range Code");
Rec.TestField("Assignable Range Code");
if CheckObjectIDDuplicity(Rec."Assignable Range Code", Rec."Object ID") then
Error(DuplicitNameErr, Rec.FieldCaption("Object ID"), Rec."Object ID", Rec."Object Type");
if not IsObjectIDWithinRange(Rec."Assignable Range Code", Rec."Object ID") then
Expand Down Expand Up @@ -140,8 +140,8 @@ table 80003 "C4BC Extension Object"
begin
Rec.TestField("Object ID");
Rec.TestField("Alternate Object ID");
Rec.TestField("Alternate Assign. Range Code");
Rec.CalcFields("Alternate Assign. Range Code");
Rec.TestField("Alternate Assign. Range Code");
if CheckObjectIDDuplicity(Rec."Alternate Assign. Range Code", Rec."Alternate Object ID") then
Error(DuplicitNameErr, Rec.FieldCaption("Alternate Object ID"), Rec."Alternate Object ID", Rec."Object Type");
if not IsObjectIDWithinRange(Rec."Alternate Assign. Range Code", Rec."Alternate Object ID") then
Expand All @@ -164,8 +164,8 @@ table 80003 "C4BC Extension Object"
C4BCExtensionHeader: Record "C4BC Extension Header";
begin
Rec.TestField("Object Type");
Rec.TestField("Assignable Range Code");
Rec.CalcFields("Assignable Range Code", "Alternate Assign. Range Code");
Rec.TestField("Assignable Range Code");
if "Object ID" = 0 then
"Object ID" := GetNewObjectID(Rec."Assignable Range Code", false);
Rec.TestField("Object ID");
Expand Down

0 comments on commit 7e7c0b9

Please sign in to comment.