Skip to content

Commit b36519c

Browse files
authored
Improve Platform Event Channels query (#47)
Th
1 parent 767ce4a commit b36519c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/main/default/classes/StreamingMonitorController.cls

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,18 +217,14 @@ public abstract class StreamingMonitorController {
217217
@TestVisible
218218
private static List<ComboBoxItem> getPlatformEventChannels() {
219219
List<EntityDefinition> entities = [
220-
SELECT Label, QualifiedApiName, IsCustomizable
220+
SELECT Label, QualifiedApiName
221221
FROM EntityDefinition
222-
WHERE IsCustomizable = TRUE AND QualifiedApiName LIKE '%e'
222+
WHERE KeyPrefix LIKE 'e%'
223223
ORDER BY Label ASC
224224
];
225225
List<ComboBoxItem> items = new List<ComboBoxItem>();
226226
for (EntityDefinition entity : entities) {
227-
if (entity.QualifiedApiName.endsWith('__e')) {
228-
items.add(
229-
new ComboBoxItem(entity.Label, entity.QualifiedApiName)
230-
);
231-
}
227+
items.add(new ComboBoxItem(entity.Label, entity.QualifiedApiName));
232228
}
233229
return items;
234230
}

0 commit comments

Comments
 (0)