You need to sign in to do that
Don't have an account?

PushTopic Creation Issue
Hi All,
To get updates from salesforce Account, Contact and AccountContacRole objets into my local database. I have create pushTopic for Account and Contact object and recieving 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 have also tries creating above pushTopic using https://workbench.developerforce.com. Still gote same Error.
Can anyone please tell me how can I ceate pushTopic for AccountContaactRole object or how can I get real time updates from this object into my local databse using salesforce Streaming Client or any other method ?
Relationship query are not supported with push topic.You cannot pull all AccountContactRole related to Account.
http://www.salesforce.com/us/developer/docs/api_streaming/api_streaming.pdf
Have a look into this guide under Unsupported Push Topic .
• Relationships aren’t supported, but you can reference an ID:
◊ Example query: SELECT Id, Contact.Account.Name FROM Contact
◊ Error message: INVALID_FIELD, relationships are not supported
If this helps you out mark it as best ans to help other
All Answers
Relationship query are not supported with push topic.You cannot pull all AccountContactRole related to Account.
http://www.salesforce.com/us/developer/docs/api_streaming/api_streaming.pdf
Have a look into this guide under Unsupported Push Topic .
• Relationships aren’t supported, but you can reference an ID:
◊ Example query: SELECT Id, Contact.Account.Name FROM Contact
◊ Error message: INVALID_FIELD, relationships are not supported
If this helps you out mark it as best ans to help other
HI Rajeev,
Even am working a similar requiment can you please help me out how to start it.
How to create a Push topic for streaming API on Account object for all DML operations(insert,update,delete,undelete).And i wanted to provide this API to ETL team.how can i start doing it,i just started my research by(https://developer.salesforce.com/page/Getting_Started_with_the_Force.com_Streaming_API) which gives basic info about streaming API. can anyone help me out in giving some sample code for all other operations and at the same time how can we test this?here i need to write any Apex class.Can you check the below code,Am a newbie please help me to fix it.
Thanks In Advance