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

How to get Fixed Asset No

(5) ShareShare
ReportReport
Posted on by 129
Hello guys,

It is a result after calculate depreciation report run.
I need a customization that enters G/L Account No. using Fixed Asset's Subclass and dimension value.
Not using Posting Group and Posting Type.
If we get Fixed Asset No. there is no problem. But I can't get it using Codeunit 5601 "FA Insert G/L Account".
I have the same question (0)
  • Martin Dráb Profile Picture
    239,029 Most Valuable Professional on at
    Moved from Integration, Dataverse, and general topics forum to Small and medium business | Business Central, NAV, RMS forum., because it seems to be about Business Central.
  • Suggested answer
    Pallavi Phade Profile Picture
    5,420 Super User 2026 Season 1 on at
     
     
    Can you check this below event in Code unit 
     
     
    This event is after you get balancing account. Do the customization and verify once.
     
    Else you need to write script on Table Fixed Asset G/L Journal Line which is not recommended 
     
     
    Warm Regards
    Pallavi Phade
  • Verified answer
    OussamaSabbouh Profile Picture
    12,878 Super User 2026 Season 1 on at
    Hello,
     
    You can’t reliably get the FA No. directly inside Codeunit 5601 because it’s creating the balancing G/L line, not the FA line. That’s by design. The standard solution is to find the related FA journal line in the same batch/document, read the FA No., Subclass, and Dimension Set, and then override the G/L Account No. based on your logic. Don’t try to replace posting group logic inside 5601—anchor your logic on the FA line and update the G/L line accordingly.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at
    Hi, Have you tried the following event? You can just use FANo.
        [EventSubscriber(ObjectType::Report, Report::"Calculate Depreciation", OnAfterCalculateDepreciation, '', false, false)]
        local procedure "Calculate Depreciation_OnAfterCalculateDepreciation"(FANo: Code[20]; var TempGenJournalLine: Record "Gen. Journal Line" temporary; var TempFAJournalLine: Record "FA Journal Line" temporary; var DeprAmount: Decimal; var NumberOfDays: Integer; DeprBookCode: Code[10]; DeprUntilDate: Date; EntryAmounts: array[4] of Decimal; DaysInPeriod: Integer)
        begin
        end;

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans