I have debug the code. Actually the Error is happened in the following Methods
public void updateIRSReportable()
{
VendSettlementTax1099 localVendSettlementTax1099;
Tax1099Amount minAmount = Tax1099Fields::find(this.Tax1099Box).Tax1099Amount;
;
select sum(SettleTax1099Amount)
from localVendSettlementTax1099
where ((localVendSettlementTax1099.VendAccount == this.VendAccount) &&
(localVendSettlementTax1099.Tax1099Box == this.Tax1099Box));
localVendSettlementTax1099.skipDatabaseLog(true);
localVendSettlementTax1099.skipDataMethods(true);
ttsbegin;
if (localVendSettlementTax1099.SettleTax1099Amount >= minAmount)
{
localVendSettlementTax1099.clear();
update_recordset localVendSettlementTax1099 setting
IRSReportable = NoYes::Yes
where ((localVendSettlementTax1099.VendAccount == this.VendAccount) &&
(localVendSettlementTax1099.Tax1099Box == this.Tax1099Box));
}
else
{
localVendSettlementTax1099.clear();
update_recordset localVendSettlementTax1099 setting
IRSReportable = NoYes::No
where ((localVendSettlementTax1099.VendAccount == this.VendAccount) &&
(localVendSettlementTax1099.Tax1099Box == this.Tax1099Box));
}
ttscommit;
localVendSettlementTax1099.skipDatabaseLog(false);
localVendSettlementTax1099.skipDataMethods(false);
}
In this method when a field is updated then it fires the update method of this table. And the Update method fire the updateIRSReportable method. Thus a continuous loop is created. The program can not terminate from this continous loop.
Actually the updateIRSReportable method update IRSReportable flag of this table. If no update happen then it does not fire the update method. I have seen that all the IRSReportable flag are true before running this method from database. After debug the code it also set IRSReportable flag true. Actually No update happen. So why it fire the update method.
I have also observed that the method work fine for Update 1099 Tax under Vendor form >> Function>> Update 1099 Tax
But It does not work for Bank>> Checks>> Payment Reversal.
Please advised me how can I solve this Problem.