My SF account (PE with API) doesn't return the "sobject" fields in streaming API notification that it should.
I'v tested with a free developer account, and it works fine there.
I create a push topic like this:
PushTopic pushTopic = new PushTopic();
pushTopic.ApiVersion = 29.0;
pushTopic.Name = 'LeadStream_2901141156';
pushTopic.Description = 'Important lead information';
pushtopic.Query = 'SELECT Company,Country,CreatedDate,Email,Id,Industry,LeadSource,MobilePhone,Name,Phone,Status FROM Lead';
pushTopic.NotifyForOperationCreate = true;
pushTopic.NotifyForOperationUpdate = true;
pushTopic.NotifyForOperationUndelete = true;
pushTopic.NotifyForOperationDelete = true;
pushTopic.NotifyForFields = 'Referenced';
insert pushTopic;
And this is the notification:
Message received from: /topic/LeadStream_2901141156
{
"channel": "/topic/LeadStream_2901141156",
"clientId": "1xz9m8wc1eyerr3110gjbgklnguk7",
"data": {
"event": {
"type": "updated",
"createdDate": "2014-01-29T01:59:52.000+0000"
},
"sobject": {
"Name": "Ned Flanderz",
"Status": "Open",
"CreatedDate": "2013-12-11T04:08:54.000+0000",
"Id": "00Q9000000Ma8a7EAB",
"Company": "Leftorium"
}
}
}
As you can see, there's a lot of fields missing from "sobject"....
The SF doc says: "The fields that you specify in the PushTopic query SELECT clause are contained in the notification message".... But my experience so far is that you can't control which fields get returned.