+ Start a Discussion
ehgtehgt 

SFID

I would like to know if I can use my SFIDs in my own DB and trust that they would never change. Is there a scenerio where SFIDs for my records would somehow change? For example, If I was moved from NA2 to NA5, would that impact the IDs, or are my IDs globally unique?

 

Thanks,

 

ehgt

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

Just as an addendum to all the previous posts, a record's SFID will never change inside an organization. If you are migrated to a new instance (for example, from NA2 to NA5), all records created up to that point will retain their original ID values (e.g. ???4???????????, where 4 is the server ID of NA2), while any new records created after that point will take on an ID appropriate to the new instance (e.g. ???7??????????, where 7 is the server ID of NA5). At least until stated otherwise, it is safe to assume that any export pulled from your organization will match up ID records for records still in your organization for all time. Even deleting and then undeleting (via the recycle bin) will not change the record ID.

All Answers

MikeGillMikeGill
I would hope so. Once an ID is assigned to a record it should never change. I'm not 100% sure.
MikeGillMikeGill
Forgot to add, don't forget the ids are case sensitive
Ankit AroraAnkit Arora

Ids of record will never change and are globally unique.

 

There are two type of Ids in salesforce

 

1) 15-Digit - Which is case sensitive

2) 18-Digit - Which is case insensitive

 

We generally use 18 digit id for API purpose. Here is some more reference :

 

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

 

Now if you change the organization and want to have the same record there also then the same Ids can't be carried over. When you insert the record in new organization all will have new and different unique Ids.

 

Record Ids are same in only one case, when we are working in fullcopy sandbox and production org.

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

sfdcfoxsfdcfox

Just as an addendum to all the previous posts, a record's SFID will never change inside an organization. If you are migrated to a new instance (for example, from NA2 to NA5), all records created up to that point will retain their original ID values (e.g. ???4???????????, where 4 is the server ID of NA2), while any new records created after that point will take on an ID appropriate to the new instance (e.g. ???7??????????, where 7 is the server ID of NA5). At least until stated otherwise, it is safe to assume that any export pulled from your organization will match up ID records for records still in your organization for all time. Even deleting and then undeleting (via the recycle bin) will not change the record ID.

This was selected as the best answer
ehgtehgt

Thanks everyone for your answers!