Salesforce coding project – Development best practices in Six Steps
Author
January 19, 2021
You are a developer in a new Salesforce project. Or you are a CIO that is curious about the journey that your organization is about to take on Salesforce platform with more rollouts planned after your marketing/sales teams went live. Even if one Apex class is used, let us call it a coding project. You may use for simple purposes to achieve skill-based-routing in Einstein bots deployed to Salesforce omnichannel. More complex code is written if you are going for full customization work involving daily batch jobs or custom application user interface development in Visualforce, Aura Lightning or Lightning web components.
Most implementation projects done are agile. A developer does not always get a fresh new project to work on. So, the steps below assume that a developer is given a user story to work on an ongoing project.
Following are the six steps you can follow
STEP 1: Understand the story
1. Read acceptance criteria: if your stories do not call out acceptance criteria clearly, speak with your product owner or scrum master.
2. Think from end user perspective: think of the benefits the user will get from the feature that is to be developed in the story.
3. See if everything makes sense: see if the story connects with other stories in the Epic and the whole epic makes sense after all.
4. Complete the story by asking the right questions: not all stories ask these questions explicitly. Have a checklist and ask these questions:
- Which all profiles can have access to this feature (if it is something that end user can access)?
- Will they all access the same way?
- What are the performance requirements for this feature?
5. Understand the features/epics dependent on this user story and the features/epics that feed into this user story
6. What are the new/complex technology areas used in this user story?
STEP 2: Understand existing code base
1. Understand the relevant entity relationships (i.e., ER diagram)
2. Understand all the access points for this epic and this story specifically: Sales/service cloud, Community portal, Marketing cloud, Batch job, etc.
3. Is there something built already? If yes, understand purposes of those existing components and their working. How are they composed together in the backend? What are the Lightning components, Apex classes, triggers, validation rules, Process builders, etc. working behind the scenes?
STEP 3: Plan how you want to build
1. Will you have new Lightning components? Then provide an outline for their need and how the class behind will support
2. Are you planning any object changes? Any other metadata changes?
3. If there are changes to be made to existing Lightning component and existing Apex code, detail what changes are planned.
STEP 4: Create Development Subtasks
Let us take an assume it is some UI-initiated functionality. Now, how can we go about creating the subtasks?
1. Write down all the UI actions that need to be coded. Divide UI actions into ones that need to refer to Apex/object in the backend and ones that that can be just tackled within the JavaScript in the frontend.
2. Have Estimates and target time to complete each of the internal action listed above
For each of the UI-only actions
- Write down how the UI/JavaScript changes that will be needed.
For each of the UI+backend actions:
- Write down what Apex has to provide. Mention if new methods are needed in Apex or if changes are expected in logic of existing methods or if any signature change expected in existing methods.
- Write down how the UI/JavaScript changes that will be needed
3. Let us look at an example: On Load of screen, we need to show a custom filter that includes a picklist and two date input text boxes with a Go / Reset button (see screenshot below). Every time the user runs a query, we save the query information in some custom object; if user clicks Reset, we clear out this information. Imagine that this section is added to an existing custom Lightning component that displays all data in a Lightning datatable pertaining to this entity.
Subtasks & Estimated
4. Remember to do unit testing along with every step
5. You will need Apex Unit tests to be written for any new Apex code written as well. If you are using LWC components, you need Jest unit test as well
STEP 5: Speak with your team before you build
2. Speak with your Business Analyst / Quality Analyst to see if they have any other scenarios in mind.
STEP 6: Complete development
2. Update design document and API document that you would have to reflect the changes that you just made.
Summary
Salesforce likes to tell all greenfield customers that Salesforce is a platform that you can achieve a lot without coding. It is true. Apart from the ability to customize Salesforce implementations, Salesforce does exist as a development platform that can be used to build any kind of application. You know it already if you are a Lightning web component developer customizing Salesforce platform. In the above article, you can see how you can approach a new custom development story in Salesforce and complete it to the satisfaction of all the stakeholders.
Pranshu Goyal, Director of Products at Mirekta, states: “We envision DSM to be used by every small to a medium-sized organization dealing with bad data and want to get rid of duplicates easily with no cost. We have faced issues dealing with duplicates in our organization. That inspired us to make a solution that is not only simple to use but can be used widely to make the organization’s data clean to make them more efficient and productive. We want DSM to be a solution for every organization looking for duplicate management capability better than the Salesforce out-of-the-box solution with no additional cost.”
Recent Posts
-
Choosing the Right Salesforce Integration Partner: A Complete Guide22 Apr 2025 Blog
-
Salesforce Higher Education: Transforming Modern Universities15 Apr 2025 Blog
-
AI Agents The Future of Business Applications09 Apr 2025 Blog
-
Why Purpose-Built AI Agents Are the Future of AI at Work07 Apr 2025 Blog
-
How the Atlas Reasoning Engine Powers Agentforce03 Apr 2025 Blog
-
Leveraging AI for Code Analysis, Real-Time Interaction, and AI-driven Documentation02 Apr 2025 Use-case
-
Transforming Healthcare with AI-Powered Patient Health Monitoring with Fitbit & Salesforce01 Apr 2025 Use-case
-
5 Myths About Autonomous Agents in Salesforce28 Mar 2025 Blog
-
AI for Nonprofits: Boosting Fundraising with Salesforce Einstein, Agentforce, and Smarter InsightsShape25 Mar 2025 Use-case
-
AI-Powered Vaccination Scheduling with Einstein Copilot & Predictive AI21 Mar 2025 Use-case
-
Leveraging AI to Enhance Sales Effectiveness13 Mar 2025 Use-case
-
Revolutionizing Manufacturing with AI: Predictive Maintenance, Supply Chain Optimization, and More11 Mar 2025 E-Book
-
NetSuite for Manufacturing: Streamlining Operations and Solving Key Challenges07 Mar 2025 Blog
-
How to Build Your First Agent in Salesforce Agentforce24 Feb 2025 Blog
-
ERP vs Salesforce Revenue Cloud: Which One is Right for Your Business?24 Feb 2025 E-Book
-
Revolutionizing Manufacturing with Salesforce: A Playbook for Efficiency & Growth18 Feb 2025 E-Book
-
Salesforce 2025 Game-Changing Trends You Need to Know28 Jan 2025 Blog
-
Agentforce 2.0: Everything You Need to Know About the Latest Update22 Jan 2025 Blog
-
The Ultimate Guide to NetSuite Development: Tools and Techniques10 Jan 2025 Blog
-
How Salesforce Nonprofit Cloud Transforms Fundraising Strategies10 Jan 2025 Blog
Categories
Featured by



