How to Calculate the Current Fiscal Year

How to Calculate the Current Fiscal Year?

  • There is no function that will give you the fiscal year.
  • Here’s a code that will get the fiscal year according to the accounting period.
  • Define two date variables Date1 and Date2.
  • Define one record variable “Accounting Period”. 

AccountingPeriod.SETRANGE(“New Fiscal Year”,TRUE);
AccountingPeriod.”Starting Date” := WORKDATE;
Date1 := AccountingPeriod.”Starting Date”;
IF AccountingPeriod.NEXT = 0 THEN
  Date2 := 12319999D
  Date2 := AccountingPeriod.”Starting Date” – 1;

How to Create General Ledger Setup in D365 BCHow to Create Purchases and Payables Setup in D365 BC
D365 BC Licensing and FunctionalitiesFiscal calendars, fiscal years, and periods– Microsoft Docs

Leave a Reply