Skip to content

Commit 2d7f74f

Browse files
committed
feat: Added support to use order by in SOQL queries for the core:ExportFiles Add On #779
1 parent b0945c2 commit 2d7f74f

File tree

1 file changed

+5
-7
lines changed
  • src/modules/components/common_components

1 file changed

+5
-7
lines changed

src/modules/components/common_components/common.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -1216,19 +1216,17 @@ export class Common {
12161216
};
12171217
let whereValuesCounter: number = 0;
12181218
let whereValues = new Array<string>();
1219+
12191220
let parsedWhere: Query;
12201221
if (whereClause) {
1221-
parsedWhere = whereClause && parseQuery('SELECT Id FROM Account WHERE (' + whereClause + ')');
1222-
//parsedWhere.where.left.openParen = 1;
1223-
//parsedWhere.where.left.closeParen = 1;
1222+
parsedWhere = parseQuery('SELECT Id FROM Account WHERE (' + whereClause + ')');
12241223
}
12251224

12261225
let parsedOrderBy: Query;
1227-
if(orderByClause){
1228-
parsedOrderBy = orderByClause && parseQuery('SELECT Id FROM Account ORDER BY ' + orderByClause + '')
1226+
if (orderByClause) {
1227+
parsedOrderBy = parseQuery('SELECT Id FROM Account ORDER BY ' + orderByClause + '')
12291228
}
12301229

1231-
12321230
function* queryGen() {
12331231
while (true) {
12341232
for (let whereClausLength = whereClauseLength; whereClausLength < CONSTANTS.MAX_SOQL_WHERE_CLAUSE_CHARACTER_LENGTH;) {
@@ -1255,7 +1253,7 @@ export class Common {
12551253
tempQuery.where.operator = "AND";
12561254
}
12571255

1258-
if(parsedOrderBy){
1256+
if (parsedOrderBy) {
12591257
tempQuery.orderBy = parsedOrderBy.orderBy
12601258
}
12611259

0 commit comments

Comments
 (0)