+ Start a Discussion
Admin Administrator 11Admin Administrator 11 

How can we update pushtopic query

Hi,

After creating pushtopic, how can I update the query?
ex: I need to add one more field to my query
Any help would be appreciated
Admin Administrator 11Admin Administrator 11
In case if someone wants the solution
Go to Developer console -> Debug -> Open Execute Anonymous Window
Then type the below
PushTopic pt = new PushTopic(Id='', Query = 'select id, name from account'); update(pt);
execute the query
Mahesh Shimpi 4Mahesh Shimpi 4
Yes, you can use like this from Dev-Console
 
PushTopic p = new PushTopic(Id='Set-Your-Push-topic-id-here', Query = 'select id, name from account'); 
update(p);