Skip to content

Commit

Permalink
extending GL Setup API (#27660)
Browse files Browse the repository at this point in the history
#### Summary
Added Shortcut Dimension Codes to the API page for "G/L Setup"

Fixes #26805

Fixes
[AB#541734](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/541734)
  • Loading branch information
miljance authored Nov 27, 2024
1 parent 583d582 commit 1945118
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
32 changes: 32 additions & 0 deletions Apps/W1/APIV2/app/src/pages/APIV2GLSetup.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,38 @@ page 30087 "APIV2 - G/L Setup"
{
Caption = 'Allow Query From Consolidation';
}
field(shortcutDimension1Code; Rec."Shortcut Dimension 1 Code")
{
Caption = 'Shortcut Dimension 1 Code';
}
field(shortcutDimension2Code; Rec."Shortcut Dimension 2 Code")
{
Caption = 'Shortcut Dimension 2 Code';
}
field(shortcutDimension3Code; Rec."Shortcut Dimension 3 Code")
{
Caption = 'Shortcut Dimension 3 Code';
}
field(shortcutDimension4Code; Rec."Shortcut Dimension 4 Code")
{
Caption = 'Shortcut Dimension 4 Code';
}
field(shortcutDimension5Code; Rec."Shortcut Dimension 5 Code")
{
Caption = 'Shortcut Dimension 5 Code';
}
field(shortcutDimension6Code; Rec."Shortcut Dimension 6 Code")
{
Caption = 'Shortcut Dimension 6 Code';
}
field(shortcutDimension7Code; Rec."Shortcut Dimension 7 Code")
{
Caption = 'Shortcut Dimension 7 Code';
}
field(shortcutDimension8Code; Rec."Shortcut Dimension 8 Code")
{
Caption = 'Shortcut Dimension 8 Code';
}
}
}
}
16 changes: 16 additions & 0 deletions Apps/W1/APIV2/test/src/APIV2GLSetupE2E.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ codeunit 139860 "APIV2 - G/L Setup E2E"
Assert.AreEqual(GeneralLedgerSetup."Additional Reporting Currency", PropertyJsonToken.AsValue().AsCode(), 'Expected the same additionalReportingCurrency for generalLedgerSetup');
JsonToken.AsObject().Get('localCurrencySymbol', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Local Currency Symbol", PropertyJsonToken.AsValue().AsText(), 'Expected the same localCurrencySymbol for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension1Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 1 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension1Code for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension2Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 2 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension2Code for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension3Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 3 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension3Code for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension4Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 4 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension4Code for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension5Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 5 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension5Code for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension6Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 6 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension6Code for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension7Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 7 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension7Code for generalLedgerSetup');
JsonToken.AsObject().Get('shortcutDimension8Code', PropertyJsonToken);
Assert.AreEqual(GeneralLedgerSetup."Shortcut Dimension 8 Code", PropertyJsonToken.AsValue().AsText(), 'Expected the same shortcutDimension8Code for generalLedgerSetup');
end;

}

0 comments on commit 1945118

Please sign in to comment.