IDEMPIERE-5926 SOAP WebService failing -> Invalid Lookup value (#2101)

This commit is contained in:
Carlos Ruiz 2023-11-10 15:10:28 +01:00 committed by GitHub
parent c9ade514bb
commit 12c1e24753
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ import java.util.logging.Level;
import org.compiere.model.Lookup; import org.compiere.model.Lookup;
import org.compiere.model.MLookup; import org.compiere.model.MLookup;
import org.compiere.model.MRole; import org.compiere.model.MRole;
import org.compiere.model.MTable;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.DB; import org.compiere.util.DB;
import org.compiere.util.Env; import org.compiere.util.Env;
@ -216,6 +217,8 @@ public class ADLookup {
if (displayColumnName != null) if (displayColumnName != null)
{ {
if (displayColumnName.equals(m_keyColumnName))
displayColumnName = MTable.get(Env.getCtx(), m_tableName).getIdentifierColumns()[0];
sql = new StringBuffer(); sql = new StringBuffer();
sql.append("SELECT ").append(m_keyColumnName) sql.append("SELECT ").append(m_keyColumnName)
.append(" FROM ").append(m_tableName) .append(" FROM ").append(m_tableName)