9
  1. Let us say, I have a recordType for an object in Production. Assuming RecordTypeId is a12345678, if I "refresh" a sandbox (Not a full copy sandbox), the recordType will be created in the refreshed sandbox with the same recordTypeId. Is this correct?

  2. I created a recordType for an object in my dev sandbox (Not a full copy sandbox) (The recordType doesn't exist in Production yet). Let us assume the RecordTypeId is a12345678 in the sandbox. If through change sets, I move it to Production, will the recordTypeId be the same in Production as well?

  3. I know that full-copy sandboxes Ids will be the same as in Production. But what about developer or developer-pro sandboxes? Are all the Ids the same? (I'm not talking about data record Ids.)

2 Answers 2

8
  1. yes the record type ids will be the same. And that's not just for record types, field ids and any object prefixes (first three parts of a record id) will also be the same.

  2. they will differ. If you create record types, fields or objects their ids will be different once deployed to production.

  3. yes once they are refreshed from production.

3
  • How about the record Ids. Can you please update. Thanks
    – sfdcFanBoy
    Mar 20, 2015 at 7:44
  • Hi @Zokito, can you please post a link to salesforce doc reference if you got please. Thanks. Apr 26, 2018 at 4:50
  • @PasanEeriyagama sorry for the wait. No that was a experimental conclusion.
    – zokito
    May 4, 2018 at 11:19
0

The short answer is yes, the ids change between the environments. Look here to see how you can avoid hard coding ids in your code.

2
  • You answer conflicts with the one below. Please confirm! Thank you
    – sfdcFanBoy
    Mar 20, 2015 at 7:43
  • My answer is based on the documentation and it clearly states that you should avoid hard-coding ids. The article I've referenced even has an example about record types, the question you were asking. Mar 20, 2015 at 17:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .