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

Notifications

Announcements

No record found.

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 117
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
    237,967 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
    4,124 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
    6,351 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
    95,729 Super User 2025 Season 2 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans