I am trying to create a push topic notification for the Contract object via the following code:
PushTopic pushTopic = new PushTopic(); pushTopic.Name = 'RefreshContract'; pushTopic.Query = 'SELECT Id, Name FROM Contract'; pushTopic.ApiVersion = 31.0; pushTopic.NotifyForFields = 'Referenced'; insert pushTopic;
When I try to execute the code via the Dev Console(Execute anonymous window) so I can define the channel for this object, I receive the following error:
System.DmlException: Insert failed. First exception on row 0; first error: INVALID_FIELD, 'Contract' is not supported: [Query]
Any ideas? Is there any workaround to be able to receive push topic notifications for Contracts?
Thanks in advance.