Don’t Use Salesforce’s Apex Test Data Approach
Metillium Salesforce Tech Consulting
by Luke Freeland
1M ago
Salesforce has been the center of my professional life since 2011. I’m a big advocate for Salesforce and love much of what they do. However, not their Apex Test Data Approach! Salesforce recommends adding the test data creation to a separate test data factory class using static utility methods. Putting the test data creation in a separate class or classes is good! What is not so good is using static utility methods. Let’s look at some examples… TestDataFactory From the Common Test Utility Classes, they provide this TestDataFactory: @IsTest public class TestDataFactory { public static void ..read more
Visit website
Salesforce Summer 23 Release Review
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
Since I just published the Salesforce Spring Release review and I have some time while traveling, I thought I’d review the Summer 23 Release Notes and provide my review here. The release notes were published this week and are hot off the press! There were many small platform improvements in this release that’ll help admins and developers. Some notable items are Automate and Migrate User Access with User Access Policies Mass Quick Actions on Related Lists Synchronize Component Data Without a Page Refresh Using RefreshView API Query Five Levels of Parent-to-Child Relationships in SOQL Queries U ..read more
Visit website
Saleforce Spring Release Review
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
It’s been a bit since I’ve had a new post. I have been busy creating courses for Salesforce Ben such as the Introduction to Salesforce Apex course. The “Introduction to SOQL” course is in review and work has begun on the “Apex Triggers” course. Now, let’s get down to business with the Spring 23 release with the release notes. Bulk Manage Picklist Values Save time managing your picklists. You can now delete, activate, deactivate, or replace multiple custom picklist field values at once. Previously, you modified them one at a time. This feature is available only for custom picklists with predef ..read more
Visit website
Formula Field & Validation Rule Inline Comments
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
Did you know that you can add comments directly into the body of your Salesforce formula field and validation rules? NO? One can do so by surrounding the comment with /* and */. In Apex and other programming languages, this is the multiline commenting syntax. I’ve used this for two primary reasons. 1) To provide some inline comments so someone knows why a certain condition is being used and to provide additional context. My first recommendation is to put this information in the description but not everyone reads it! 2) To temporarily comment out parts of the body while developing and testing i ..read more
Visit website
Helpful Software Books
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
I’ve been a professional Software Engineer for many years now and I still love it! Here are some books I’ve read along the way that were insightful and are reread periodically since they stand the test of time and are occasionally updated with newer editions. Refactoring By Martin Fowler Refactoring is the process of changing the internal structure of your code so it’s more maintainable without changing its behavior. Martin shows how to systematically do this with various examples. It was also helpful to label the different refactorings so one can succinctly describe what to do to others. The ..read more
Visit website
Flows are Programming!
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
Yes that’s a thought provoking title! Let’s see why… But first a definition… Programming – The instructions given to a computer or a computer system to fulfill a task. If you expand the definition on dictionary.com, #11 has the same definition as mine but mine constrains it to computers. Why? Salesforce and many others in the ecosystem market flows as “Low or no code”. However, my take is that flows are simply another way of programming besides using Code. If you can learn Flows, you can learn to write code too because they use the same fundamental building blocks! Those are sequencing, select ..read more
Visit website
Line Item Schedule Lookup Formulas
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
In Salesforce, the Opportunity Line Item Schedule Object represents information about the quantity, revenue distribution, and delivery dates for a particular Opportunity Line Item. It’s part of Sales Cloud. On the Salesforce Ohana Slack, which can be be joined here, someone asked how they could use a flow to delete these opportunity line item schedule records when an opportunity reaches a certain status. My first thought was that should be easy… Create an after-save flow on the Opportunity object with the desired start conditions and then use a “Delete Records” element on “Opportunity Line Ite ..read more
Visit website
Select Multiple Records from a Flow Data Table in First Look
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
In the Salesforce Winter 23 Release, the “Data Table” flow component, in Beta, now allows one to select multiple records within a screen flow. Typically, I wait until something is GA to try it out but this feature is something I’ve wanted for years so let’s take a look… For contriving sake, let’s say I want users to be able to select up to 10 of the most recently edited accounts. Start by creating a new Screen Flow, add a screen element and then add a Data Table to the screen. This results in something like this: Configuring Source Collection The Source Collection tells the data table where th ..read more
Visit website
New Salesforce Assert Class
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
In the Winter 23 Salesforce release, the Assert Apex Class is new. It has many static methods that help provide clearer assertions within Apex test code. It was created so developers can write clearer and more maintainable test code. Let’s look at some examples to compare and contrast. Expression True Assertions Old Way Boolean containsHello = 'Hello World'.contains('Hello'); system.assert(containsHello, 'The message does not contain Hello'); New Way Boolean containsHello = 'Hello World'.contains('Hello'); Assert.isTrue(containsHello, 'The message does not contain Hello'); Equality Asser ..read more
Visit website
Client Credentials OAuth Exploration
Metillium Salesforce Tech Consulting
by Luke Freeland
1y ago
In the Salesforce Winter Release Review, Salesforce announced that one can authenticate with the API using only a client id and client secret from the corresponding “Connected App” and the API requests will run as a specified user using the new “Client Credentials” OAuth2 flow. That is very useful for system-to-system integrations that I previously would typically use the “Username / Password” OAuth2 flow for. The “Username / Password” flow requires one to also supply the username, password, and security token as part of the API authentication request in addition to the Client Id and Client Se ..read more
Visit website

Follow Metillium Salesforce Tech Consulting on FeedSpot

Continue with Google
Continue with Apple
OR