8
  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.)

6
  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.

  • How about the record Ids. Can you please update. Thanks – sfdcFanBoy Mar 20 '15 at 7:44
  • Hi @Zokito, can you please post a link to salesforce doc reference if you got please. Thanks. – Pasan Eeriyagama Apr 26 '18 at 4:50
  • @PasanEeriyagama sorry for the wait. No that was a experimental conclusion. – zokito May 4 '18 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.

  • You answer conflicts with the one below. Please confirm! Thank you – sfdcFanBoy Mar 20 '15 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. – Mihai Neagoe Mar 20 '15 at 17:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.