Salesforce Record Ids vary across environments. Thus if a Record Id is hardcoded in Apex code, the code may not work as expected when it is
deployed in another environment. This happens because the environment in which the code is deployed may not have the same hardcoded record Id. Hence
it is a best practice to avoid hard coding record Ids.
This rule raises an issue when it detects hardcoded record Ids, i.e. strings which contain 15 or 18 characters and which start with any of the
prefixes listed by Salesforce
Noncompliant code example
for(Case c: Trigger.new){
if(c.RecordTypeId=='012500000009tuy'){ // Noncompliant
// ...
} else if(c.RecordTypeId=='0123000000095Kmwer'){ // Noncompliant
// ...
}
}