hi WVDUREN
try to run the below job in your server to get the corrupted lines recid, you will find these line in AccountingDistribution table ,and if you deleted these lines every thing will go ok and the period will be close successfully
static void SFTYClosingLedgerDocumentsIssue(Args _args)
{
AccountingDistribution accountingDistribution;
FiscalCalendar fiscalCalendar;
FiscalCalendarPeriod fiscalCalendarPeriod;
FiscalCalendarPeriod _currentPeriod;
Ledger ledger;
;
select * from _currentPeriod where _currentPeriod.RecId==5637145934;
if (_currentPeriod)
{
while select RecId from accountingDistribution
where accountingDistribution.AccountingDate >= _currentPeriod.StartDate &&
accountingDistribution.AccountingDate <= _currentPeriod.EndDate &&
accountingDistribution.AccountingEvent == 0
exists join ledger
where ledger.PrimaryForLegalEntity == accountingDistribution.AccountingLegalEntity
exists join fiscalCalendar
where fiscalCalendar.RecId == ledger.FiscalCalendar
exists join fiscalCalendarPeriod
where fiscalCalendarPeriod.FiscalCalendar == fiscalCalendar.RecId &&
fiscalCalendarPeriod.RecId == _currentPeriod.RecId
{
//if (accountingDistribution)
//{
info(queryValue(accountingDistribution.RecId));
//_fiscalCalendars.addWarning(strFmt("@SYS344293",_currentPeriod.Name));
//}
}
}
}