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?
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?
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
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.
they will differ. If you create record types, fields or objects their ids will be different once deployed to production.
yes once they are refreshed from production.
-
-
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.– zokitoMay 4, 2018 at 11:19
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 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