function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VDaveVDave 

Streaming API Different Object Id on Delete then Create


I have noticed that the Id, ContactId, AccountId provided to me via the streaming api is differnt when I create/update to when the object is dleted. There are 3 additional characters at the end when I create/update. What are these characters? What do they do? And why are they also not present when I delete the object? 

When I create the object I get a message like this:
Message received from: /topic/CaseNotifications
{
  "channel": "/topic/CaseNotifications",
  "clientId": "19mycqd2dq10elvg0r0r0jhlcci",
  "data": {
    "event": {
      "type": "created",
      "createdDate": "2014-04-04T13:19:40.000+0000"
    },
    "sobject": {
      "Status": "New",
      "AccountId": "001i000000M4Iu5AAF",
      "Subject": "yrdy",
      "ContactId": "003i000000IP4VTAA1",
      "Id": "500i0000007RQ4KAAW",
      "CaseNumber": "00001048",
      "Priority": "Medium"
    }
  }
}


When I delete I get the following message:
Message received from: /topic/CaseNotifications
{
  "channel": "/topic/CaseNotifications",
  "clientId": "19mycqd2dq10elvg0r0r0jhlcci",
  "data": {
    "event": {
      "type": "deleted",
      "createdDate": "2014-04-04T13:19:47.000+0000"
    },
    "sobject": {
      "Id": "500i0000007RQ4K"
    }
  }
}

Note in the above the id: 500i0000007RQ4KAAW when I create the object and an id of 500i0000007RQ4K when I delete the object. Why are these different?
Best Answer chosen by VDave
Vinita_SFDCVinita_SFDC
Hi,

The IDs are same, one is 15digit and another is 18digit. 18-char versions are not case sensitive like the 15-char Ids. Read more at :

http://forceguru.blogspot.co.uk/2010/12/how-salesforce-18-digit-id-is.html

All Answers

Vinita_SFDCVinita_SFDC
Hi,

The IDs are same, one is 15digit and another is 18digit. 18-char versions are not case sensitive like the 15-char Ids. Read more at :

http://forceguru.blogspot.co.uk/2010/12/how-salesforce-18-digit-id-is.html
This was selected as the best answer
VDaveVDave
Thanks! That is exaclty what I was looking for.