Skip to content

Commit

Permalink
Fix of assigning field/value ID (Err: Record #ObjectID, #FieldID alre…
Browse files Browse the repository at this point in the history
…ady exists)
  • Loading branch information
TKapitan committed Mar 13, 2021
1 parent 6017ea1 commit aefd2fb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
3 changes: 2 additions & 1 deletion App/Src/AssignableRanges/AssignableRangeHeader.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ table 80001 "C4BC Assignable Range Header"
if Rec."Ranges per BC Instance" and (ForBusinessCentralInstance = '') then
Error(MissingParameterErr, Rec.FieldCaption("Ranges per BC Instance"));

C4BCExtensionObjectLine.SetCurrentKey("Object Type", "Object ID");
C4BCExtensionObjectLine.SetCurrentKey("Object Type", "ID");
C4BCExtensionObjectLine.SetAscending("ID", true);
C4BCExtensionObjectLine.SetRange("Object Type", ForObjectType);
C4BCExtensionObjectLine.SetRange("Assignable Range Code", Rec."Code");
if Rec."Ranges per BC Instance" then begin
Expand Down
4 changes: 4 additions & 0 deletions App/Src/Extensions/API/ExtensionObjectLAPI.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ page 80012 "C4BC Extension Object L. API"
{
ApplicationArea = All;
}
field(name; Rec.Name)
{
ApplicationArea = All;
}
field(systemCreatedAt; Rec.SystemCreatedAt)
{
ApplicationArea = All;
Expand Down
9 changes: 7 additions & 2 deletions App/Src/Extensions/ExtensionObjectLine.Table.al
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ table 80006 "C4BC Extension Object Line"
field(5; ID; Integer)
{
Caption = 'ID';
Editable = false;
DataClassification = CustomerContent;
}
field(6; "Created By"; Text[50])
field(6; Name; Text[30])
{
Caption = 'Name';
DataClassification = CustomerContent;
}
field(7; "Created By"; Text[50])
{
Caption = 'Created By';
DataClassification = SystemMetadata;
Expand Down Expand Up @@ -65,6 +69,7 @@ table 80006 "C4BC Extension Object Line"
{
Clustered = true;
}
key(Fields; "Object Type", "ID") { }
}

trigger OnInsert()
Expand Down
5 changes: 5 additions & 0 deletions App/Src/Extensions/ExtensionObjectLines.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ page 80010 "C4BC Extension Object Lines"
ApplicationArea = All;
ToolTip = 'ID of the field or the enum value';
}
field(Name; Rec.Name)
{
ToolTip = 'Specifies name of the field. The evidence of field names is optional.';
ApplicationArea = All;
}
field("Created By"; Rec."Created By")
{
ApplicationArea = All;
Expand Down

0 comments on commit aefd2fb

Please sign in to comment.