Introduction Greetings my fellow earth dwellers. Previously, I blogged about the acquisition of dependent picklists in Apex (as the title implies). Although the algorithm works, I managed to later identify what seemed to be 3 bottlenecks in the code. So I’m going to do what I think is “the right thing to do” and share my solutions to them 🙂 … Read More
Salesforce: Acquiring Dependent Picklists in Apex
Introduction They said I had to use the API and that Salesforce doesn’t provide a way to natively do it in Apex. I said no. Welcome back my people. Once more I’ve encountered a situation which required quite a bit of elaborate effort to figure out. Note: There is an optimized adjustment to some of the final code at the … Read More
Salesforce: Searching Multiple Objects Using SOQL instead of SOSL
SOQL Across Multiple Objects vs SOSL Welcome back my children. Once again, I’ve encountered a situation where I’ve needed to improvise. For these code examples, remember to use the “expand code (<- ->)” option on the snippets to see everything. The Issue(s): 1. I needed a way to be able to take a given object id and determine it’s … Read More
Tales of the Salesforce Spirit: Custom Object Mass Deleter (Part IV of IV)
Conclusion Welcome back boys and girls. Get your crayons out and have as seat as we finally conclude this series. Long, but worth it. In order to get to a working result, I’m just going to pretend that we created a custom object called “Book” (Book__c) for the display purpose. Given that this is the case, we can then assume … Read More
Tales of the Salesforce Spirit: Custom Object Mass Deleter (Part III of IV)
The Mass Delete Controller I will definitely take my time to explain this part as it’s the engine behind how this will work. So let’s look at this in steps. The purpose of this class will be to handle the mass delete of custom objects in a generic manner. To do this we need the all the entities we created … Read More
Tales of the Salesforce Spirit: Custom Object Mass Deleter (Part II of IV)
To be honest with you, I really didn’t expect the explanation to be this in depth, but you never know until you start. So here we cover the question “WHAT ARE THE BASIC CLASSES THAT WE WILL NEED FIRST?” I think we’ll need about 6 of them: TCriteria TPaging (With it’s Respective IPagingEventHandler interface) ISOQLValueConverter TSelectionEntity TApexEntity TCustomSearch TCriteria The purpose of this class is to handle the search criteria for the objects. … Read More
Tales of the Salesforce Spirit: Custom Object Mass Deleter (Part I of IV)
So, I’m doing my thing at work – Salesforce Certified Developer. A situation presents itself where I need to delete multiple records at once. The best part is, they all belong to custom objects and salesforce only allows mass delete on select standard objects. You know what this means then – you got to make it yourself. Now I see the need … Read More