From 12c1e247539268bc31de4993b73ab3351553d69d Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 10 Nov 2023 15:10:28 +0100 Subject: [PATCH] IDEMPIERE-5926 SOAP WebService failing -> Invalid Lookup value (#2101) --- .../WEB-INF/src/org/idempiere/adinterface/ADLookup.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ADLookup.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ADLookup.java index 8ad9f86c4d..4fb654585f 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ADLookup.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/ADLookup.java @@ -19,6 +19,7 @@ import java.util.logging.Level; import org.compiere.model.Lookup; import org.compiere.model.MLookup; import org.compiere.model.MRole; +import org.compiere.model.MTable; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -216,6 +217,8 @@ public class ADLookup { if (displayColumnName != null) { + if (displayColumnName.equals(m_keyColumnName)) + displayColumnName = MTable.get(Env.getCtx(), m_tableName).getIdentifierColumns()[0]; sql = new StringBuffer(); sql.append("SELECT ").append(m_keyColumnName) .append(" FROM ").append(m_tableName)