Purpose:
The purpose of this document is to describe how we can quickly open fiscal periods through X++.
Development:
// Developed on 28 Dec 2015 by Muhammad Anas Khan
// Blog: dynamicsaxinsight.wordpress.com
// LinkedIn: pk.linkedin.com/in/muhammadanaskhan
// Description: Ability to confirm purchase order
static void MAKOpenFiscalPeriods(Args _args)
{
FiscalCalendarPeriod fiscalCalendarPeriod;
LedgerFiscalCalendarPeriod ledgerFiscalCalendarPeriod;
ttsBegin;
//Open fiscal periods
update_recordSet ledgerFiscalCalendarPeriod
setting Status = FiscalPeriodStatus::Open
join fiscalCalendarPeriod
where fiscalCalendarPeriod.RecId == ledgerFiscalCalendarPeriod.FiscalCalendarPeriod
&& fiscalCalendarPeriod.Type == FiscalPeriodType::Operating;
ttsCommit;
}
Comments
Post a Comment