Posts

Showing posts with the label development

Efficient way to write apex code

Apex Performance Optimization Set.contains() vs. List.contains() Why minor collection choices dictate transaction scaling and CPU governor limits in Apex. "Guess what? Small programmatic choices matter immensely in multi-tenant environments." If you’re having a cup of tea, pause for a moment. The next two minutes will reveal a simple yet overlooked reality in Salesforce development. Lists and Sets are our absolute go-to collections during a typical development cycle. However, after looking at the mathematical reality behind how the compiler evaluates them, you will definitely double-check your code before deploying. The Benchmark Setup Let’s take two collection variants—a List<Integer> and a Set<Integer> —and load them with 100,000 identical elements. Which data structure yields faster lookup performance when running a .contain...
Image
Shoot Your Custom Notifications Via Apex        Summer 19 bought a lot of surprises and one of the most enchanting one was that to send custom bell notifications from our inmate, the "Process Builder".       Custom notifications are the soul of the modern business. This feature allows you to send important information, via push to mobile or desktop alerts.    Notifications can be tailor made to inform users regarding any of the record update.  Custom Bell Notifications provide the flexibility of showcasing relevant information at the right time to our users.        All these involves just a handful of steps.       From setup, enter Custom Notifications in the quick find box.      Create a new custom notifications type, also define either desktop or phone to pop-up your notifications. You can select both the locations.        Hope that wa...