Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

FA Ledger Entries Page API POST/PATCH Actions

(0) ShareShare
ReportReport
Posted on by 77

In a demo tenant production environment, I created a new Page Api extension for the FA Ledger Entry Source table. The Get action returns success, but the POST action does not work and returns an error message: Bad Request 400, Internal_ServerError, message: Sorry, the current permissions prevented the action.

I am using an admin user for that demo tenant when making postman calls.

The requests are being made with Postman.

This is the code for my Page Api:

page 51175 "FA Ledger Entries Page API"
{
    PageType = API;
    Caption = 'FA Ledger Entries Page API';
    APIPublisher = 'TestPublisher';
    APIVersion = 'v1.0';
    APIGroup = 'TestGroup';
    EntityName = 'faledgerentry';
    EntitySetName = 'faledgerentries';
    SourceTable = "FA Ledger Entry";
    DelayedInsert = true;
    ModifyAllowed = true;
    DeleteAllowed = true;
    InsertAllowed = true;
    ODataKeyFields = SystemId;

    layout
    {
        area(Content)
        {
            repeater(GroupName)
            {
                field(Amount; Amount)
                {
                    Caption = 'Amount';
                    ApplicationArea = All;
                }
                field("AutomaticEntry"; "Automatic Entry")
                {
                    Caption = 'Automatic Entry';
                    ApplicationArea = All;
                }
                field("AmountLCY"; "Amount (LCY)")
                {
                    Caption = 'Amount (LCY)';
                    ApplicationArea = All;
                }
                field("BalAccountNo"; "Bal. Account No.")
                {
                    Caption = 'Bal. Account No.';
                    ApplicationArea = All;
                }
                field("BalAccountType"; "Bal. Account Type")
                {
                    Caption = 'Bal. Account Type';
                    ApplicationArea = All;
                }
                field("CanceledfromFANo"; "Canceled from FA No.")
                {
                    Caption = 'Canceled from FA No.';
                    ApplicationArea = All;
                }
                field(Correction; Correction)
                {
                    Caption = 'Correction';
                    ApplicationArea = All;
                }
                field("CreditAmount"; "Credit Amount")
                {
                    Caption = 'Credit Amount';
                    ApplicationArea = All;
                }
                field("DebitAmount"; "Debit Amount")
                {
                    Caption = 'Debit Amount';
                    ApplicationArea = All;
                }
                field("DecliningBalance"; "Declining-Balance %")
                {
                    Caption = 'Declining-Balance %';
                    ApplicationArea = All;
                }
                field("DeprthisyearCustom1"; "Depr. % this year (Custom 1)")
                {
                    Caption = 'Depr. % this year (Custom 1)';
                    ApplicationArea = All;
                }
                field("DeprEndingDateCustom1"; "Depr. Ending Date (Custom 1)")
                {
                    Caption = 'Depr. Ending Date (Custom 1)';
                    ApplicationArea = All;
                }
                field("DeprStartingDateCustom1"; "Depr. Starting Date (Custom 1)")
                {
                    Caption = 'Depr. Starting Date (Custom 1)';
                    ApplicationArea = All;
                }
                field("DepreciationBookCode"; "Depreciation Book Code")
                {
                    Caption = 'Depreciation Book Code';
                    ApplicationArea = All;
                }
                field("DepreciationEndingDate"; "Depreciation Ending Date")
                {
                    Caption = 'Depreciation Ending Date';
                    ApplicationArea = All;
                }
                field("DepreciationMethod"; "Depreciation Method")
                {
                    Caption = 'Depreciation Method';
                    ApplicationArea = All;
                }
                field("DepreciationStartingDate"; "Depreciation Starting Date")
                {
                    Caption = 'Depreciation Starting Date';
                    ApplicationArea = All;
                }
                field("DepreciationTableCode"; "Depreciation Table Code")
                {
                    Caption = 'Depreciation Table Code';
                    ApplicationArea = All;
                }
                field(Description; Description)
                {
                    Caption = 'Description';
                    ApplicationArea = All;
                }
                field("DimensionSetID"; "Dimension Set ID")
                {
                    Caption = 'Dimension Set ID';
                    ApplicationArea = All;
                }
                field("DisposalCalculationMethod"; "Disposal Calculation Method")
                {
                    Caption = 'Disposal Calculation Method';
                    ApplicationArea = All;
                }
                field("DisposalEntryNo"; "Disposal Entry No.")
                {
                    Caption = 'Disposal Entry No.';
                    ApplicationArea = All;
                }
                field("DocumentDate"; "Document Date")
                {
                    Caption = 'Document Date';
                    ApplicationArea = All;
                }
                field("DocumentNo"; "Document No.")
                {
                    Caption = 'Document No.';
                    ApplicationArea = All;
                }
                field("DocumentType"; "Document Type")
                {
                    Caption = 'Document Type';
                    ApplicationArea = All;
                }
                field("EntryNo"; "Entry No.")
                {
                    Caption = 'Entry No.';
                    ApplicationArea = All;
                }
                field("ExternalDocumentNo"; "External Document No.")
                {
                    Caption = 'External Document No.';
                    ApplicationArea = All;
                }
                field("FAClassCode"; "FA Class Code")
                {
                    Caption = 'FA Class Code';
                    ApplicationArea = All;
                }
                field("FAExchangeRate"; "FA Exchange Rate")
                {
                    Caption = 'FA Exchange Rate';
                    ApplicationArea = All;
                }
                field("FALocationCode"; "FA Location Code")
                {
                    Caption = 'FA Location Code';
                    ApplicationArea = All;
                }
                field("FANo"; "FA No.")
                {
                    Caption = 'FA No.';
                    ApplicationArea = All;
                }
                field("FANoBudgetedFANo"; "FA No./Budgeted FA No.")
                {
                    Caption = 'FA No./Budgeted FA No.';
                    ApplicationArea = All;
                }
                field("FAPostingCategory"; "FA Posting Category")
                {
                    Caption = 'FA Posting Category';
                    ApplicationArea = All;
                }
                field("FAPostingDate"; "FA Posting Date")
                {
                    Caption = 'FA Posting Date';
                    ApplicationArea = All;
                }
                field("FAPostingGroup"; "FA Posting Group")
                {
                    Caption = 'FA Posting Group';
                    ApplicationArea = All;
                }
                field("FAPostingType"; "FA Posting Type")
                {
                    Caption = 'FA Posting Type';
                    ApplicationArea = All;
                }
                field("FASubclassCode"; "FA Subclass Code")
                {
                    Caption = 'FA Subclass Code';
                    ApplicationArea = All;
                }
                field("FixedDeprAmount"; "Fixed Depr. Amount")
                {
                    Caption = 'Fixed Depr. Amount';
                    ApplicationArea = All;
                }
                field("GLEntryNo"; "G/L Entry No.")
                {
                    Caption = 'G/L Entry No.';
                    ApplicationArea = All;
                }
                field("GenBusPostingGroup"; "Gen. Bus. Posting Group")
                {
                    Caption = 'Gen. Bus. Posting Group';
                    ApplicationArea = All;
                }
                field("GenPostingType"; "Gen. Posting Type")
                {
                    Caption = 'Gen. Posting Type';
                    ApplicationArea = All;
                }
                field("GenProdPostingGroup"; "Gen. Prod. Posting Group")
                {
                    Caption = 'Gen. Prod. Posting Group';
                    ApplicationArea = All;
                }
                field("GlobalDimension1Code"; "Global Dimension 1 Code")
                {
                    Caption = 'Global Dimension 1 Code';
                    ApplicationArea = All;
                }
                field("GlobalDimension2Code"; "Global Dimension 2 Code")
                {
                    Caption = 'Global Dimension 2 Code';
                    ApplicationArea = All;
                }
                field("IndexEntry"; "Index Entry")
                {
                    Caption = 'Index Entry';
                    ApplicationArea = All;
                }
                field("JournalBatchName"; "Journal Batch Name")
                {
                    Caption = 'Journal Batch Name';
                    ApplicationArea = All;
                }
                field("LocationCode"; "Location Code")
                {
                    Caption = 'Location Code"';
                    ApplicationArea = All;
                }
                field("NoofDepreciationDays"; "No. of Depreciation Days")
                {
                    Caption = 'No. of Depreciation Days';
                    ApplicationArea = All;
                }
                field("NoofDepreciationYears"; "No. of Depreciation Years")
                {
                    Caption = 'No. of Depreciation Years';
                    ApplicationArea = All;
                }
                field("NoSeries"; "No. Series")
                {
                    Caption = 'No. Series';
                    ApplicationArea = All;
                }
                field("PartofBookValue"; "Part of Book Value")
                {
                    Caption = 'Part of Book Value';
                    ApplicationArea = All;
                }
                field("PartofDepreciableBasis"; "Part of Depreciable Basis")
                {
                    Caption = 'Part of Depreciable Basis';
                    ApplicationArea = All;
                }
                field("PostingDate"; "Posting Date")
                {
                    Caption = 'Posting Date';
                    ApplicationArea = All;
                }
                field("PropertyClassCustom1"; "Property Class (Custom 1)")
                {
                    Caption = ' Property Class (Custom 1)';
                    ApplicationArea = All;
                }
                field(Quantity; Quantity)
                {
                    Caption = 'Quantity';
                    ApplicationArea = All;
                }
                field("ReasonCode"; "Reason Code")
                {
                    Caption = 'Reason Code';
                    ApplicationArea = All;
                }
                field("Reclassification1Entry"; "Reclassification Entry")
                {
                    Caption = 'Reclassification Entry';
                    ApplicationArea = All;
                }
                field("ResultonDisposal"; "Result on Disposal")
                {
                    Caption = 'Result on Disposal';
                    ApplicationArea = All;
                }
                field(Reversed; Reversed)
                {
                    Caption = 'Reversed';
                    ApplicationArea = All;
                }
                field("ReversedbyEntryNo"; "Reversed by Entry No.")
                {
                    Caption = 'Reversed by Entry No.';
                    ApplicationArea = All;
                }
                field("ReversedEntryNo"; "Reversed Entry No.")
                {
                    Caption = 'Reversed Entry No.';
                    ApplicationArea = All;
                }
                field("ShortcutDimension3Code"; "Shortcut Dimension 3 Code")
                {
                    Caption = 'Shortcut Dimension 3 Code';
                    ApplicationArea = All;
                }
                field("ShortcutDimension4Code"; "Shortcut Dimension 4 Code")
                {
                    Caption = 'Shortcut Dimension 4 Code';
                    ApplicationArea = All;
                }
                field("ShortcutDimension5Code"; "Shortcut Dimension 5 Code")
                {
                    Caption = 'Shortcut Dimension 5 Code';
                    ApplicationArea = All;
                }
                field("ShortcutDimension6Code"; "Shortcut Dimension 6 Code")
                {
                    Caption = 'Shortcut Dimension 6 Code';
                    ApplicationArea = All;
                }
                field("ShortcutDimension7Code"; "Shortcut Dimension 7 Code")
                {
                    Caption = 'Shortcut Dimension 7 Code';
                    ApplicationArea = All;
                }
                field("ShortcutDimension8Code"; "Shortcut Dimension 8 Code")
                {
                    Caption = 'Shortcut Dimension 8 Code';
                    ApplicationArea = All;
                }
                field("SourceCode"; "Source Code")
                {
                    Caption = 'Source Code';
                    ApplicationArea = All;
                }
                field("StraightLine"; "Straight-Line %")
                {
                    Caption = 'Straight-Line %';
                    ApplicationArea = All;
                }
                field(SystemCreatedAt; SystemCreatedAt)
                {
                    Caption = 'SystemCreatedAt';
                    ApplicationArea = All;
                }
                field(SystemCreatedBy; SystemCreatedBy)
                {
                    Caption = 'SystemCreatedBy';
                    ApplicationArea = All;
                }
                field(SystemId; SystemId)
                {
                    Caption = 'SystemId';
                    ApplicationArea = All;
                }
                field(SystemModifiedAt; SystemModifiedAt)
                {
                    Caption = 'SystemModifiedAt';
                    ApplicationArea = All;
                }
                field(SystemModifiedBy; SystemModifiedBy)
                {
                    Caption = 'SystemModifiedBy';
                    ApplicationArea = All;
                }
                field(SystemRowVersion; SystemRowVersion)
                {
                    Caption = 'SystemRowVersion';
                    ApplicationArea = All;
                }
                field("TaxAreaCode"; "Tax Area Code")
                {
                    Caption = 'Tax Area Code';
                    ApplicationArea = All;
                }
                field("TaxGroupCode"; "Tax Group Code")
                {
                    Caption = 'Tax Group Code';
                    ApplicationArea = All;
                }
                field("TaxLiable"; "Tax Liable")
                {
                    Caption = 'Tax Liable';
                    ApplicationArea = All;
                }
                field("TransactionNo"; "Transaction No.")
                {
                    Caption = 'Transaction No.';
                    ApplicationArea = All;
                }
                field("UseFALedgerCheck"; "Use FA Ledger Check")
                {
                    Caption = 'Use FA Ledger Check';
                    ApplicationArea = All;
                }
                field("UserID"; "User ID")
                {
                    Caption = 'User ID';
                    ApplicationArea = All;
                }
                field("VATAmount"; "VAT Amount")
                {
                    Caption = 'VAT Amount';
                    ApplicationArea = All;
                }
                field("VATBusPostingGroup"; "VAT Bus. Posting Group")
                {
                    Caption = 'VAT Bus. Posting Group';
                    ApplicationArea = All;
                }
                field("VATProdPostingGroup"; "VAT Prod. Posting Group")
                {
                    Caption = 'VAT Prod. Posting Group';
                    ApplicationArea = All;
                }
            }
        }
    }
}

  • Verified answer
    Mohana Yadav Profile Picture
    Mohana Yadav 60,050 Super User 2024 Season 2 on at
    RE: FA Ledger Entries Page API POST/PATCH Actions

    We have to use FA Journals to post to FA Ledger Entries and we should not post to any Ledger Entry table directly.

  • Suggested answer
    chigivigi Profile Picture
    chigivigi 77 on at
    RE: FA Ledger Entries Page API POST/PATCH Actions

    The POST and PATCH actions are not needed or possible for this table.

  • chigivigi Profile Picture
    chigivigi 77 on at
    RE: FA Ledger Entries Page API POST/PATCH Actions
    [deleted]

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans