function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KevinG514KevinG514 

Push topic with only custom fields doesn't notify client

I ran into this issue this morning.  If i create a topic with the query string like this

 

SELECT Id FROM CASE WHERE RoutedInteractionId__c != null AND RoutingComplete__c = true 

 

I don't get any notifications on it.  When i change the query string to 

 

SELECT Id FROM CASE WHERE RoutedInteractionId__c != null AND RoutingComplete__c = true AND Status != 'New'

 

I do get notifications.  So it appears to be a problem with having only custom fields in the query string.  

KevinG514KevinG514

I mentioned this to the dev team at Dreamforce last week, but I got my conditions mixed up.  I thought the problem was with custom fields in the select and that i wasn't querying the Id which is required.  The problem is using only custom fields in the WHERE

Vinod MehraVinod Mehra

SELECT Id FROM CASE WHERE RoutedInteractionId__c != null AND RoutingComplete__c = true 

 

This topic will generate events only when:

 

1. One of RoutedInteractionId__c or RoutingComplete__c fields change

2. The new values meet the WHERE clause.

 

I am guessing RoutingComplete__c is currently true. If you change it to false, it will not meet the WHERE criteria

 

For RoutedInteractionId__c, the only time it will generate events is when the value changes from null to a non null value. 

 

So you may have to rethink your query.

 

 

> SELECT Id FROM CASE WHERE RoutedInteractionId__c != null AND RoutingComplete__c = true AND Status != 'New'



You have added a new field here "Status". This means events will be fired when:

 

1. Status field changes

2. new value is != 'New'

 

This condition is easy to meet. That's why you are receiving events.