diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index 3333e428b7..9fa5445e24 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -5520,12 +5520,16 @@ public abstract class PO * @return true if all the foreign keys are valid */ private void checkRecordIDCrossTenant() { - int idxTableId = p_info.getColumnIndex("AD_Table_ID"); - if (idxTableId < 0) + // exclude read-only high-traffic tables + if ( MChangeLog.Table_Name.equals(get_TableName()) + || MRecentItem.Table_Name.equals(get_TableName())) return; int idxRecordId = p_info.getColumnIndex("Record_ID"); if (idxRecordId < 0) return; + int idxTableId = p_info.getColumnIndex("AD_Table_ID"); + if (idxTableId < 0) + return; if ( ! (is_new() || is_ValueChanged(idxTableId) || is_ValueChanged(idxRecordId))) return; int recordId = get_ValueAsInt(idxRecordId);