Use Name vs DeveloperName for RecordType?

Actually, that is not quite true. Name is the field that the user sees when they choose it in the screen (or on the Page Layout). Developer Name is the API name for the record.

This is very similar to the way the Label and the API Name work for fields and object.

Because of this, it is best practice to always use Developer Name, since it is less likely to change (and it is unique in the object). As a dev, you can easily rename the Name to adjust to changing business requirements, but need not rename the Developer Name and leave your code working just fine.

Per the Docs:

Developer Name

Required. The unique name of the object in the API. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. In managed packages, this field prevents naming conflicts on package installations. With this field, a developer can change the object’s name in a managed package and the changes are reflected in a subscriber’s organization. Label is Record Type Name.

Name

Required. Label of the record type in the user interface. Limit: 80 characters. Label is Record Type Label.

You can read the entire explanation here, in SFDC documentation.


Use a unique identifier wherever possible to query for vital configuration data. In this case, DeveloperName is unique, where Name is not. So there is a clear and compelling case to use the former.


Developer name is optional, usually label changes quite frequently.

Best practice is to always use developer name to get recordtype Id.