Skip to content

Instantly share code, notes, and snippets.

@awesomeandrey
Last active February 24, 2025 18:10
Show Gist options
  • Select an option

  • Save awesomeandrey/7e7a667eca11dbf6f8b0e988c0d344ce to your computer and use it in GitHub Desktop.

Select an option

Save awesomeandrey/7e7a667eca11dbf6f8b0e988c0d344ce to your computer and use it in GitHub Desktop.
Salesforce Developer Bootcamp

Purpose and Structure of This Gist

โ„น๏ธ This gist is designed to serve as a structured guide for Salesforce developers looking to improve their technical skills through hands-on exercises and real-world implementations. The primary goal is to list out useful exercises and ideas that can be applied within a Salesforce environment to enhance knowledge and problem-solving capabilities.

The document is divided into multiple sections, each focusing on different aspects of Salesforce development/cloud.

By following these exercises, developers will progressively enhance their expertise, making them well-equipped for real-world Salesforce implementations.

Setting Up a Salesforce Playground Environment

Why Do You Need a Salesforce Playground Environment?

A Salesforce Playground Environment is essential for developing, experimenting, and testing Salesforce solutions without rela affecting production environments. This setup provides a safe space to:

  • Experiment with new Salesforce features and configurations.
  • Develop Apex code, Lightning Web Components (LWC), and automation flows in POC context.
  • Boost/train your DevOps skills by establishing CI/CD pipelines around your environment.
  • Test out Salesforce release updates before they're enforced.

By following this guide, you will create a pseudo-production environment that mimics an actual Salesforce deployment pipeline.

Prerequisites

Before starting, ensure you have the following:

  • โœ… Salesforce Free Developer Org with Dev Hub enabled.
  • โœ… Salesforce CLI installed and configured.
  • โœ… GitHub account with a new repository.
  • โœ… Fundamental knowledge of Git and Salesforce metadata management.

Establish a Pseudo-Production Environment

The first step involves configuring a free Salesforce Developer Edition org to act as a pseudo-production instance. This environment will serve as the central repository for metadata and configurations, mimicking a real-world production setup.

Create and Structure Project

A dedicated GitHub repository should be initialized to store Salesforce metadata in a structured manner. Organizing files logicallyโ€”whether by module, cloud, or functionalityโ€”ensures maintainability and clarity. This repository will act as the single source of truth for tracking changes, collaborating on updates, and managing deployments.

Implement CI/CD Automations

Integrating a CI/CD pipeline is an essential component of a robust development workflow.

The following automations are highly recommended:

  • Pull Request Validation โ€“ Triggers a validation deployment of changes from the feature branch to the production org whenever a pull request is created or updated.
  • Manual & Scheduled Deployments โ€“ Ensures that the project's source code is redeployed to the production environment both manually & daily at the start of the day while executing Apex tests.
  • Another crucial automation to implement is SFDX Replacements. Utilize the dotenv NPM package to manage and configure environment variables efficiently.

Visual representation: Salesforce Development Workflow-CI_CD - Playground

These automations form the minimum required setup. You can further enhance them by incorporating Prettier checks, PMD scans, Jest test executions, and other quality checks as needed.

Learn and configure GitHub Actions (GHA) to accomplish this step.

Reference Repository

For more details & samples, check out this repository: minlopro-dx.

Salesforce Core Exercises

Lightning Web Components

Exercises

๐Ÿ”ถ Build custom picklist component which:

๐Ÿ”ถ Build custom lightning-datatable extension that:

  • leverages Custom Data Types (CDTs)
    • cover as much unsupported data types as possible (e.g. picklist, multi-picklist, lookup)
  • supports inline-edit mode (Excel-like UX)
  • supports editing dependent picklists in inline-edit mode
  • leverages out-of-box row-level validation & error handling

Example preview: datatable_contacts_demo

๐Ÿ”ถ Build custom LWC that merges PDF files:

  • import external JS library via static resources or CDN
  • learn pdf-lib.js as an example
  • investigate other alternatives

๐Ÿ”ถ Build custom LWC that extracts text from images/pdf files:

  • identify popular OCR JS libraries
  • leverage Tesseract-JS to accomplish task

๐Ÿ”ถ Build custom lookup component

Apex

Exercises

๐Ÿ”ถ Build custom Logger module/framework

Sample UI: sample custom logger

๐Ÿ”ถ Build custom tabular component that:

  • queries & displays records from custom/standard object (Account, Contact etc.)
  • play with decent data volume -- 1000 to 5000 records
  • supports 2 variations of pagination:
    • Keyset Pagination (driven by indexed fields, e.g. Id) --> truly Senior level)
    • LIMIT/OFFSET Pagination (driven by SOQL statements)

๐Ÿ”ถ Build custom Trigger Handler framework

  • make sure it supports ability to mock handlers in Apex Tests
  • optionally: try incorporating popular TH frameworks

Salesforce Integrations

Exercises

๐Ÿ”ถ Learn how Custom Auth.Providers (CAPs) work:

  • Integrate CAPs with legacy Named Credentials
  • Integrate CAPs with modern Secured Endpoint (driven by External Credentials)
  • Make sure your CAPs cover the following OAuth 2.0 flows:
  • Make sure each CAP handles Refresh Token Flow
  • Experiment with Per-User named credentials and learn standard data model behind it
  • Incorporate Connected App & Named Credential(s) deployments into CI/CD workflow (partially OR fully)
Named Credentials Connected App Auth. Providers
image image image

Hints:

  • leverage the same 'loopback' Connected App to cover all integration flows

๐Ÿ”ถ Salesforce Connect & External Objects

Miscellaneous

Exercises

๐Ÿ”ถ Learn DavaWeave Scripts

  • Try writing custom dw script that processes CSV file with 1K rows, call DW from Apex
  • Benchmark DW scrips VS custom CSV parsing approach

๐Ÿ”ถ Learn SFDMU Plugin

  • Incorporate SFDMU plugin into your scratch generation script
  • Seed scratch org with data from DevHub org

๐Ÿ”ถ Learn sfdx-git-delta (SGD) plugin

  • Incorporate SGD plugin into CI/CD flow (the speed up pull request validation job)

Experience Cloud (aka Communities, DXP)

Exercises

๐Ÿ”ถ Create your own DXP Site

  • Pull & Deploy community metadata, learn its structure from behind
  • Learn Guest user concept and its limitations/peculiarities
  • Build simple custom pages declaratively in Experience Cloud Builder and configure their visibility based on user profiles/custom permissions
  • Incorporate community metadata into CI/CD flow (learn which XML attributes are vital)
  • Discover how to deactivate/archive/delete communities

๐Ÿ”ถ Create Salesforce Public REST Endpoint

  • Discover how to create Salesforce Public REST Endpoint
  • Configure public REST endpoint as a GitHub deployment webhook in DevHub org
Calling Public REST Endpoint via cURL Custom Notifications About GHA Deployments
image image

๐Ÿ”ถ Build custom site login form

  • Explore DXP site auto-generated aura components and apex classes (learn what API is called to login site users)
  • Develop custom LWC to handle user login/registration

Sample:

image

๐Ÿ”ถ Force.com Sites

  • Explore use cases for Force.com sites
  • Learn differences & commonalities between DXP and Force.com sites
  • Incorporate Force.com site metadata into the project

Sales Cloud

Exercises

๐Ÿ”ถ Web-To-Lead Form

  • Set up w2l form in Setup menu
  • Explore REST API behind w2l
  • Identify how to pass in standard VS custom Lead fields
  • Accompany leads generation with Assignment Rules (e.g. upon w2l leads creation assign it to the queue)
  • Host w2l form in Experience Cloud
  • Incorporate w2l metadata into CI/CD pipeline
  • Learn how to 'debug' w2l leads via out-of-the-box form parameters
W2L Form Hosted On DXP Site
image

๐Ÿ”ถ Leads Conversion

  • Learn how conversion settings are set up declaratively (mapping between Lead, Contact, Account & Opportunity)
  • Build custom LWC that lets user convert lead manually respecting Database.LeadConvert and Database.DMLOptions under the hood
Select Lead Lead Conversion Modal
image image

Service Cloud

Exercises

๐Ÿ”ถ Learn Duplicate & Matching Rules Intricacies

  • Build custom LWC that lets user find duplicates by record prototypes
  • Build custom reports to collect duplicate data insights (driven by DuplicateRecordSet (DRS) + known when DRSs records are produced)
  • Incorporate both standard & custom duplicate rules into CI/CD pipeline
  • Learn how merge DML keyword works on duplicate records

๐Ÿ”ถ Set Up Omni-Channel to handle Cases

Service_Chat_Preview

๐Ÿ”ถ Set up Salesforce Knowledge

  • Learn how data categories work and how they can be used to manage knowledge article (KA) visibilities
  • Explore KAs lifecycle with PublishingService
  • Host KAs on Experience Cloud (DXP site) letting guest users to see them
  • Update your scratch generation script to seed scratch orgs with sample knowledge articles from DevHub org (use SFDMU plugin for data import)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment