Salesforce Quick Tips Image
| | |

Salesforce Developer Quick Tip – How to Dynamically Get Record Type IDs in Apex

As a Salesforce developer, you will inevitably face a scenario where you need to assign a specific Record Type ID to a record you are creating or updating in Apex. The “quick and dirty” solution is to copy the ID from the URL and hardcode it directly into your class. Don’t do this. Hardcoding IDs…