diff --git a/src/modules/components/common_components/common.ts b/src/modules/components/common_components/common.ts index b8e3abab..b1e4446a 100644 --- a/src/modules/components/common_components/common.ts +++ b/src/modules/components/common_components/common.ts @@ -1216,19 +1216,17 @@ export class Common { }; let whereValuesCounter: number = 0; let whereValues = new Array(); + let parsedWhere: Query; if (whereClause) { - parsedWhere = whereClause && parseQuery('SELECT Id FROM Account WHERE (' + whereClause + ')'); - //parsedWhere.where.left.openParen = 1; - //parsedWhere.where.left.closeParen = 1; + parsedWhere = parseQuery('SELECT Id FROM Account WHERE (' + whereClause + ')'); } let parsedOrderBy: Query; - if(orderByClause){ - parsedOrderBy = orderByClause && parseQuery('SELECT Id FROM Account ORDER BY ' + orderByClause + '') + if (orderByClause) { + parsedOrderBy = parseQuery('SELECT Id FROM Account ORDER BY ' + orderByClause + '') } - function* queryGen() { while (true) { for (let whereClausLength = whereClauseLength; whereClausLength < CONSTANTS.MAX_SOQL_WHERE_CLAUSE_CHARACTER_LENGTH;) { @@ -1255,7 +1253,7 @@ export class Common { tempQuery.where.operator = "AND"; } - if(parsedOrderBy){ + if (parsedOrderBy) { tempQuery.orderBy = parsedOrderBy.orderBy }