To get updates from salesforce Account, Contact and AccountContacRole objects into my local database. I have create pushTopic for Account and Contact object and receiving update messages using JAVA streaming client successfully.

But when I was creating pushTopic for AccountContactRole object using following query in developer console.

PushTopic pushTopic = new PushTopic(); pushTopic.Name = 'ACRoleTableStreaming'; pushTopic.Query = 'SELECT AccountId,ContactId,IsDeleted,IsPrimary,Role FROM AccountContactRole'; pushTopic.ApiVersion = 30.0; pushTopic.NotifyForOperationCreate = true; pushTopic.NotifyForOperationUpdate = true; pushTopic.NotifyForOperationUndelete = true; pushTopic.NotifyForOperationDelete = true; pushTopic.NotifyForFields = 'Referenced'; insert pushTopic;

I am getting following Error message.

12:59:29:065 EXCEPTION_THROWN [10]|System.DmlException: Insert failed. First exception on row 0; first error: INVALID_FIELD, 'AccountContactRole' is not supported: [Query]

FYI I am using salesforce developer account and have also tries creating above pushTopic using https://workbench.developerforce.com. And Still gote same Error. i.e. "Error Creating Push Topic: 'AccountContactRole' is not supported."

Can anyone please tell me how can I create pushTopic for AccountContaactRole object
how can I get real time updates from this object into my local database using salesforce Streaming Client or any other method ?

1 Answer 1


Unfortunately, it's not supported with the Streaming API. From the Streaming API Docs (v30):

All custom objects are supported in PushTopic queries. The following subset of standard objects are supported in PushTopic queries: Account, Campaign, Case, Contact, Lead, Opportunity, Task. The following standard objects are supported in PushTopic queries through a pilot program: ContractLineItem, Entitlement, LiveChatTranscript, Quote, QuoteLineItem, ServiceContract.

You also cannot do relationships in a PushTopic query, so you can't simply look at Accounts with all children AccountContactRoles.

Another common pattern is to make a shadow object of AccountContactRoles for push notifications, but that's not possible since you cannot create a trigger on that object.

It looks like polling with a pull operation might be your best bet here.

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.