- This is a project based on work by Evan Callahan (formerly of Groundwire, and now at Salesforce) who wrote
- this class (Repo has been deleted. Sadface.) a long time ago to
- reduce the number of describe calls required to work with Record Types.
-
-
- I've updated the project (by pulling test code out of the main class - that's how old it was!) and have added some additional methods. The included test class has 100%
- coverage, so pull this into your org and get cracking!
-
+
This is a project based on work by Evan Callahan (formerly of Groundwire, and now at Salesforce) who wrote this class (Repo has been deleted. Sadface.) a long time ago to reduce the number of describe calls required to work with Record Types.
+
I've updated the project (by pulling test code out of the main class - that's how old it was!) and have added some additional methods. The included test class has 100% coverage, so pull this into your org and get cracking!
Of note: The test code assumes that you have no record types for the Solution object. If you do, you may need to remove that test method.
Badges
-
-
-
-
-
-
-
+
+
+
+
+
The Code
The class and test class are found in this folder. Feel free to copy/paste directly into your org.
Add methods to get default RecordTypeId, handling situation where no RT is on the Profile but at least one is avaialble via Permission Set.
-
Add test methods against Account and Solution objects, as we assume Solution has no defined record types. (Change for your org if you have them.)
-
-
-
2022-03-29 BREAKING CHANGE: Replaced "DeveloperName" with "DevName" in all method names. Update your code to refer to the new methods.
-
-
- 2022-03-29 Add maps Id => Name and Id => DeveloperName for ease of use when wanting to refer to a record type by Id without including the object, since Id is globally
- unique
-
-
-
2022-01-19 Initial Release
+
2023-08-18
+
+
Add methods to get default RecordTypeId, handling situation where no RT is on the Profile but at least one is avaialble via Permission Set.
+
Add test methods against Account and Solution objects, as we assume Solution has no defined record types. (Change for your org if you have them.)
+
+
+
2022-03-29 BREAKING CHANGE: Replaced "DeveloperName" with "DevName" in all method names. Update your code to refer to the new methods.
+
+
2022-03-29 Add maps Id => Name and Id => DeveloperName for ease of use when wanting to refer to a record type by Id without including the object, since Id is globally unique