Hello,
I need to bypass or comment a part of a code in a table method. If I use COC I will have to call this method in the "next()" statement and the validation will occur.
What I need to do is to remove this validation. Below is the code that I am working on. I want to comment the highlighted line in yellow from the method PayrollEarningStatementLine.validatePosition(...):
public boolean validatePosition(HcmPositionRecId _positionRecId = this.Position, boolean _showError = true)
{
PayrollEarningStatement earningStatement = this.payrollEarningStatement();
boolean ret = true;
if ((earningStatement.AutoGeneratedSalary == PayrollAutoGenerateSalary::Active
&& PayrollPositionDetails::findByPosition(_positionRecId).AutoGenerateSalary == NoYes::Yes)
&& !PayrollPositionWorkerDefaultTaxRgn::existByWorkerPosition(_positionRecId, earningStatement.Worker))
{
if (_showError)
{
ret = checkFailed("@Payroll:TheTaxRegionIsRequiredToGenerateTheSalaryEnterADefaultTaxReg");
}
else
{
ret = false;
}
}
}
Any solution please?