Skip to content

Commit

Permalink
#6548 Skip filtering by active records if luookupInfo is showing inac…
Browse files Browse the repository at this point in the history
…tive records

#6548 Lookup Process parameters shall allow inactive records
  • Loading branch information
cristinamghita committed Apr 29, 2020
1 parent 4d6b176 commit 8aac0f5
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -576,8 +576,12 @@ private static IStringExpression buildSqlWhere(final MLookupInfo lookupInfo, fin
.append(DBConstants.FUNCNAME_unaccent_string).append("(").append(LookupDataSourceContext.PARAM_FilterSql).append(", 1)");

// IsActive WHERE
sqlWhereFinal.appendIfNotEmpty("\n AND ");
sqlWhereFinal.append(" /* active */ ('").append(SqlForFetchingLookupById.SQL_PARAM_ShowInactive).append("'='Y' OR ").append(tableName).append(".IsActive='Y')");
if (!lookupInfo.isShowInactiveValues())
{
sqlWhereFinal.appendIfNotEmpty("\n AND ");
sqlWhereFinal.append(" /* active */ ('").append(SqlForFetchingLookupById.SQL_PARAM_ShowInactive)
.append("'='Y' OR ").append(tableName).append(".IsActive='Y')");
}

return sqlWhereFinal.build();
}
Expand Down

0 comments on commit 8aac0f5

Please sign in to comment.