Jun 17th, 2021
Posted on Mar 23, 2021 Tools & Tips
They’re delighted when they go in to add functionality to an existing class or trigger and discover clear and concise code. A great developer thinks about the next person who will be updating their work. They know enhancements will happen in the future and understand that their work is part of a larger system architecture. Salesforce admins should adhere to those same principles to build clear and concise automation that leaves room for future improvement.
Here are a few practical ways admins can benefit from a developer mindset.
Think critically about how metadata is named. There’s plenty of opinion around what a naming convention should look like. What’s more important is that the chosen naming convention is consistent and easily applied. A good name indicates the purpose of the component without being overly descriptive. It’s possible to have different naming conventions for different areas of the platform. For example, a validation rule may read sObject-Summary (Account-UpperCaseOnlyonName) while a flow might have a format like FlowType_Description (autolaunch_changeOpportunityOwner).
Establish these naming conventions early on and document them clearly.
Considering governor limits is an integral part of Salesforce development, keeping code bulkified and avoiding resource intensive operations. Developers know to avoid putting SQL queries or performing DML in loops. Admins should also avoid using ‘Get Records,’ ‘Create Records,’ ‘Update Records,’ or ‘Delete Records’ on a flow when inside a loop.
To help control the order of execution, developers use only one trigger per object. For the same reason, admins should minimize the number of Process Builders used for the same sObject.
The introduction of ‘Record-Triggered’ flows blurs the line between flows and triggers, making it even more important for admins to understand order of execution. Developers need to know when to use before or after triggers just as admins now need to know what Before-Save and After-Save flows are, when to apply them, and the considerations for using each.
Finally, admins should also remember to consolidate DML operations (i.e. Updates or Deletes) and perform those towards the end of each flow.
Consider using Process Builders instead of individual workflow rules. Workflow rules must be managed individually and remain disparate compared to the big picture that Process Builders provide. With a Process Builder, admins can see all conditions and actions, making it easier to avoid duplicate or redundant automation. Process Builders also force the admin to think about automation in the context of the larger architecture.
If your organization already uses workflow rules, begin taking stock of them and think about how you might group them together in a Process Builder.
Think about the implications of changes–your validation rules, your sharing rule, your field type. Will you break anything? For example, you may put a validation rule that requires Mailing City to be provided whenever a Lead’s Mailing Country = ‘USA.’ If a marketing automation tool like Pardot creates Leads in Salesforce but doesn’t require City, this may cause the sync to fail–leaving a big headache for your marketing team!
Admins should seek to understand the implications of their change in regards to the entire system architecture–seeking the best path, not just the simplest.
Follow your organization’s deployment lifecycle and testing methodologies. Have someone else test your changes. If the change affects existing business logic, make sure to allow for regression testing. Developers rely on Apex test classes. Admins should always spend the time to develop detailed test scripts. At a minimum, these tests should be performed manually during pre-release. These test scripts can also serve as the starting point for configuring your test automation software if your organization has access to such tools.
The increasing capabilities of Salesforce declarative automation tools are beginning to blur the lines between classical development and click configuration. Admins can implement powerful automation with clicks, not code. It’s more important than ever for admins to be intentional and precise with their configuration and to leave behind functionality that cannot scale with future demands.
Author: Grant Ongstad, Senior Salesforce Consultant
EightCloud's communication and quick response to address our needs made the process of moving to a new case management program seamless."
- Steve Young, Washington State Office of Superintendent of Public Instruction (OSPI)
Partners and friends, we are proud to share the new EightCloud brand and website with you. Our transformation reflects our commitment to helping you achieve Salesforce excellence through a focus on efficiency, expertise and genuine partnership.
We wish you the best and look forward to connecting with you soon!