Tuesday, May 13, 2014

The value in field 'Record-ID' is not found in the related table 'Electronic payment - remittance'

I had an issue during update AIF service operation on project expense journal inbound interface. It says

The value '5637150577' in field 'Record-ID' is not found in the related table 'Electronic payment - remittance'

The error prompts when  LedgerJournalTrans fields are validated during AIF service. But, the unusual things is, when LedgerJournalTrans.RecID goes through the function validateField() in LedgerJournalTrans table, it calls the super() in following default switch statement code snippet and results such error:
              default:
                //
                if ((TaxParameters::checkTaxParameters_IN() || TaxWithholdParameters_IN::checkTaxParameters()) &&
                    (this.Company != this.OffsetCompany))
                {
                    // When Two different companies are involve in invoice and payment..
                    ret = true;
                }
                else
                {
                //

                    ret = super(field);
                //
                }
                //

As an workaround, I had to get this "RecID" field in the switch case statement as follows so that it results true and continues:

// Dip, HP ES
            case fieldNum(LedgerJournalTrans, RecId):  
                ret = true;
                break;
            //
            default:
                //
                if ((TaxParameters::checkTaxParameters_IN() || TaxWithholdParameters_IN::checkTaxParameters()) &&
                    (this.Company != this.OffsetCompany))
                {
                    // When Two different companies are involve in invoice and payment..
                    ret = true;
                }
                else
                {
                //

                    ret = super(field);
                //
                }
                //

Cheers !

No comments:

Post a Comment