web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Fixed Asset Book Value

(0) ShareShare
ReportReport
Posted on by 240

Hello All,

am trying to bring some fields into the "FA Ledger Entries List page" all of the values are coming correct except the Book value (which is coming from the table of 

"FA Depreciation Book"
the field field Book values is coming the 0 Values. pls let me know the issues in this.
fa-table.jpg
fa-value.jpg
pageextension 60027 "Fixed Asset Leg Entries" extends "FA Ledger Entries"
{
    layout
    {
        addafter("FA No.")
        {
            field("FA Class Code"; Rec."FA Class Code")
            {
                ApplicationArea = All;
                Width = 12;
            }
            field("Depreciation Starting Date"; Rec."Depreciation Starting Date")
            {
                ApplicationArea = All;
                Caption = 'Deprec Start Dt';
            }
            field("Depreciation Ending Date"; Rec."Depreciation Ending Date")
            {
                ApplicationArea = All;
                Caption = 'Deprec End Dt';
            }
            field("Depr. % this year (Custom 1)"; Rec."Depr. % this year (Custom 1)")
            {
                ApplicationArea = All;
                Visible = false;
            }
            field(Bookvalues; Bookvalues)
            {
                ApplicationArea = all;
                Caption = 'Curr Book Value';
            }
        }
        addafter("Document Type")
        {
            field("Document Date"; Rec."Document Date")
            {
                ApplicationArea = All;
                Width = 12;
            }
        }
        moveafter("FA Posting Date"; "Posting Date")
        modify("Posting Date")
        {
            Visible = false;
        }
        moveafter("FA Class Code"; Description)
        modify("Document No.")
        {
            Width = 16;
        }
    }

    trigger OnAfterGetRecord();
    var
        FixedAsset: Record "FA Depreciation Book";
    begin
        FixedAsset.Reset();
        FixedAsset.SetRange("Book Value", Bookvalues);
        Bookvalues := FixedAsset."Book Value";
    end;

    var
        Bookvalues: Decimal;

}
I have the same question (0)
  • Suggested answer
    Javier.Armesto Profile Picture
    14 User Group Leader on at

    If it is a calculated field you will have to perform Calcfields on the field.

    If the answer has helped you mark as verified and thus we help other users who have the same problem

  • Suggested answer
    IB-29041624-0 Profile Picture
    1,177 Moderator on at

    In your OnAfterGetRecord trigger please add

    FixedAsset.Calcfields("Book Value");

    And your setrange will fail if you have more than one FA with the same book value. So i would modify that to get the FA for the current record instead.

    So you can probably change all your code to only these two lines in the trigger

    CurrRec.calcfield("Book Value");

    BookValues := CurrRec."Book Value";

  • Suggested answer
    divyeshchitte Profile Picture
    970 on at

    Kindly Add 

    Calcfield("Book value") on trigger onaftergetrec as this is flowfield

  • LearnBC Profile Picture
    240 on at

    still am not getting the value. is there any wrong on this

    pageextension 60027 "Fixed Asset Leg Entries" extends "FA Ledger Entries"
    {
        layout
        {
            addafter("FA No.")
            {
                field("FA Class Code"; Rec."FA Class Code")
                {
                    ApplicationArea = All;
                    Width = 12;
                }
                field("Depreciation Starting Date"; Rec."Depreciation Starting Date")
                {
                    ApplicationArea = All;
                    Caption = 'Deprec Start Dt';
                }
                field("Depreciation Ending Date"; Rec."Depreciation Ending Date")
                {
                    ApplicationArea = All;
                    Caption = 'Deprec End Dt';
                }
                field("Depr. % this year (Custom 1)"; Rec."Depr. % this year (Custom 1)")
                {
                    ApplicationArea = All;
                    Visible = false;
                }
                field(Bookvalues; Bookvalues)
                {
                    ApplicationArea = all;
                    Caption = 'Curr Book Value';
                }
            }
            addafter("Document Type")
            {
                field("Document Date"; Rec."Document Date")
                {
                    ApplicationArea = All;
                    Width = 12;
                }
            }
            moveafter("FA Posting Date"; "Posting Date")
            modify("Posting Date")
            {
                Visible = false;
            }
            moveafter("FA Class Code"; Description)
            modify("Document No.")
            {
                Width = 16;
            }
        }
    
        trigger OnAfterGetRecord();
        var
            FixedAsset: Record "FA Depreciation Book";
            
    
        begin
            FixedAsset.Reset();
            //FixedAsset.SetRange("Book Value", Bookvalues);
            //Bookvalues := FixedAsset."Book Value";
            FixedAsset.CalcFields("Book Value");
            BookValues := FixedAsset."Book Value";
            
        end;
    
        var
            Bookvalues: Decimal;
    
    }

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Hi,

    Please change the below code

       trigger OnAfterGetRecord()

       var

           FADeprBook: Record "FA Depreciation Book";

       begin

           FADeprBook.Reset();

           FADeprBook.SetRange("FA No.", rec."FA No.");

           FADeprBook.SetRange("Depreciation Book Code", rec."Depreciation Book Code");

           if FALedgEntry.findset then begin

               FADeprBook.CalcFields("Book Value");

               bookvalues := FADeprBook."Book Value";

           end;

       end;

  • LearnBC Profile Picture
    240 on at

    Still its not working

    pageextension 60027 "Fixed Asset Leg Entries" extends "FA Ledger Entries"
    {
        layout
        {
            addafter("FA No.")
            {
                field("FA Class Code"; Rec."FA Class Code")
                {
                    ApplicationArea = All;
                    Width = 12;
                }
                field("Depreciation Starting Date"; Rec."Depreciation Starting Date")
                {
                    ApplicationArea = All;
                    Caption = 'Deprec Start Dt';
                }
                field("Depreciation Ending Date"; Rec."Depreciation Ending Date")
                {
                    ApplicationArea = All;
                    Caption = 'Deprec End Dt';
                }
                field("Depr. % this year (Custom 1)"; Rec."Depr. % this year (Custom 1)")
                {
                    ApplicationArea = All;
                    Visible = false;
                }
                field(Bookvalues; Bookvalues)
                {
                    ApplicationArea = all;
                    Caption = 'Curr Book Value';
                }
            }
            addafter("Document Type")
            {
                field("Document Date"; Rec."Document Date")
                {
                    ApplicationArea = All;
                    Width = 12;
                }
            }
            moveafter("FA Posting Date"; "Posting Date")
            modify("Posting Date")
            {
                Visible = false;
            }
            moveafter("FA Class Code"; Description)
            modify("Document No.")
            {
                Width = 16;
            }
        }
        trigger OnAfterGetRecord()

        var

            FADeprBook: Record "FA Depreciation Book";

        begin

            FADeprBook.Reset();

            FADeprBook.SetRange("FA No.", rec."FA No.");

            FADeprBook.SetRange("Depreciation Book Code", rec."Depreciation Book Code");

            if FALedgEntry.findset then begin

                FADeprBook.CalcFields("Book Value");

                bookvalues := FADeprBook."Book Value";

            end;

        end;

        var
            Bookvalues: Decimal;

    }
  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Sorry my bad, Please change below.

    trigger OnAfterGetRecord()

       var

           FADeprBook: Record "FA Depreciation Book";

       begin

           FADeprBook.Reset();

           FADeprBook.SetRange("FA No.", rec."FA No.");

           FADeprBook.SetRange("Depreciation Book Code", rec."Depreciation Book Code");

           if FADeprBook.findset then begin

               FADeprBook.CalcFields("Book Value");

               bookvalues := FADeprBook."Book Value";

           end;

       end;

  • LearnBC Profile Picture
    240 on at

    Yes Nithin..its working perfect as expected.

    Thankyou for your support always

  • Suggested answer
    Nitin Verma Profile Picture
    21,812 Moderator on at

    Good to know

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,012 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 986 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 659 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans