Something that is frequently required to debug SQL statement is the select query that is generated. To get the SQL statement associated with the x++ select
Use the generate only and forceliterals clause in the statement.
select generateonly forceliterals disbursementJournal
join disbursementDetails
where disbursementJournal.DisbursementDetailsRecId == disbursementDetails.RecId
&& disbursementJournal.OffsetBankAccount == _bankAccountId
&& disbursementDetails.PayrollPeriodLine == _payrollPeriodLine
join hcmWorker
where hcmWorker.RecId == disbursementJournal.Worker
join workerBankAccount
where workerBankAccount.Worker == disbursementDetails.Worker
&& workerBankAccount.RecId == disbursementJournal.WorkerBankAccount
join companyBankAccount
where companyBankAccount.AccountID == disbursementJournal.OffsetBankAccount
join payrollPeriodLine
where payrollPeriodLine.RecId == disbursementDetails.PayrollPeriodLine;
info( disbursementJournal.getSQLStatement());
No comments:
Post a Comment