04 September 2019

How to get AX applciation preiod start date and end date in D365 FO or ax7

PeriodStart             periodStartDate;
PeriodEnd               periodEndDate;

periodStartDate = FiscalCalendarYear::findYearByCalendarDate(Ledger::fiscalCalendar(), DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone())).StartDate;
        periodEndDate   = FiscalCalendarYear::findYearByCalendarDate(Ledger::fiscalCalendar(), DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone())).EndDate;

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension-...