8

This is too weird and just started happening within the last few days

Execute this query in DC (V43 or V44)

SELECT Id,LastError,Name,Position,Retries,Status,Tip FROM EventBusSubscriber

In DC

Only 1 row is returned in the results pane even though it says 17 rows were found (!?!) enter image description here

In Workbench, all rows display

enter image description here

Observed in V43 and V44

And yes, SOQL on other SObjects display all results in DC just fine

4
  • 2
    Can you try the same SOQL query in the developer console, but omit the Id column from the query? My guess is the use of empty Id's is throwing off some sort of uniqueness check. Oct 3 '18 at 18:23
  • Are you sure this is new? I recall running in to this behavior with another null-id table a few years ago, so I'm pretty sure it's business as usual (it's just really hard to find objects that have null id values).
    – sfdcfox
    Oct 3 '18 at 18:53
  • @sfdcfox - you are right, what is new is my blindly typing EventBusSubscriber queries and including ID column as second nature. I feel like an idiot because I "know" this table doesn't have a useful ID column but one would think that if you get back n rows, DC would display n rows with the ID column as blank
    – cropredy
    Oct 3 '18 at 19:02
  • I've spent so long in Apex that I'm actually the exact opposite. I'm more likely to forget to include the Id field when I need it, than to include it when I don't. I'm not saying that one way or the other is better, but it's definitely important to consider which fields are included in every query, no matter how one's done it in the past.
    – sfdcfox
    Oct 3 '18 at 19:14
3

I believe you are seeing an artifact of how the Developer Console executes SOQL queries and all the ID's for EventBusSubscriber records being the empty ID.

Normally, when the developer console runs a query it sends a GET request to:

https://domain.my.salesforce.com/services/data/v43.0/query/?q=SELECT%20Id%2C%20LastError%2C%20Name%2C%20Position%2C%20Retries%2C%20Status%2C%20Tip%20FROM%20EventBusSubscriber&_dc=1538592626540

The response has already been parsed to JSON. E.g.

{"totalSize":2,"done":true,"records":[{"attributes":{"type":"EventBusSubscriber","url":"/services/data/v43.0/sobjects/EventBusSubscriber/01q0g000000PgjH"},"Id":"000000000000000AAA","LastError":null,"Name":"SmartFridgeReadingReceived","Position":0,"Retries":0,"Status":"Running","Tip":0},{"attributes":{"type":"EventBusSubscriber","url":"/services/data/v43.0/sobjects/EventBusSubscriber/01q0g000000DEDm"},"Id":"000000000000000AAA","LastError":null,"Name":"TestEventTrigger","Position":1,"Retries":0,"Status":"Running","Tip":1}]}

So far so good. Except, as I mentioned above, all the Id's are the same empty ID. Something in the processing of the JSON response requires the ID's to be unique. As they aren't, you only get shown the first row.

You can work around this by excluding the Id from the SOQL query. It doesn't add any value, so to it should be easy enough to exclude.

E.g.

enter image description here

6
  • sheesh; I've been running into so many other platform event issues that I see problems everywhere now
    – cropredy
    Oct 3 '18 at 18:59
  • 2
    I could raise this one with the web tools PM. But, while annoying, I'm not sure it will ever become a priority. Especially if they are looking longer term to replace the dev console with something newer. Oct 3 '18 at 19:02
  • 2
    well the next poor b**tard who runs into this will at least have this SFSE post as reference. I've been using this query a lot recently when diagnosing why Platform Events aren't yet consumed by comparing Tip to Position
    – cropredy
    Oct 3 '18 at 19:05
  • 1
    @Daniel - thank you for diagnosing and explaining why this isn't working. cropredy, I'm sorry you have been hitting problems frequently but I do appreciate you surfacing them and bringing them to our attention.
    – John Brock
    Oct 3 '18 at 22:51
  • @DanielBallinger - i wonder if your explanation also answers why Order By doesn't work on this sobjectType - try select tip, position, name order by name - for me, results come back in no discernible sequence.
    – cropredy
    Oct 3 '18 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.