Book Image

Salesforce Platform App Builder Certification Guide

By : Paul Goodey
Book Image

Salesforce Platform App Builder Certification Guide

By: Paul Goodey

Overview of this book

Do you want to be able to confidently design and build apps that support business processes within the Lightning Platform? Salesforce Platform App Builder Certification Guide not only helps you to do this, but also prepares you for the certification exam. The book starts by describing the core capabilities of the Lightning Platform. You'll learn techniques for data modeling to design, build, and deploy apps without writing code and achieve rapid results with the declarative capabilities that the Lightning Platform provides. Next, you'll explore utilities for importing and exporting data and the features available in the Lightning Platform to restrict and extend access to objects, fields, and records. You'll also be able to customize the Salesforce Lightning Experience user interface (UI) and build functionality for custom buttons, links, and actions. Later, this certification study guide will take you through reporting and the social and mobile features of the Lightning Platform. Finally, you’ll get to grips with Salesforce build environments and deployment options. By the end of this Salesforce book, you'll not only have learned how to build data models, enforce data security, and implement business logic and process automation, but also have gained the confidence to pass the Platform App Builder exam and achieve Salesforce certification.
Table of Contents (17 chapters)
1
Section 1: Introduction to the Lightning Platform Core
5
Section 2: Behind the Scenes
11
Section 3: A Step Closer to the Exam

Customizing the Lightning Platform

Understanding when the standard Salesforce CRM processes and out of the box features are not appropriate or not sufficient to meet given requirements and require customization is key to the knowledge required for an app builder.

In the Salesforce Certified Platform App Builder Exam Guide, the total number of questions that will appear for customizing the Lightning Platform as part of the Salesforce Fundamentals objective is as follows:

Salesforce Fundamentals: "Given a scenario, identify the boundaries of declarative customization and the use cases for programmatic customization"

There are likely to be 1 or 2 questions in total. This is calculated as 8% of the 60 total exam questions, which is 4.8 or 5 questions and 3 features/functions in the Salesforce Fundamentals objective.

We will now look at the following concepts and considerations for customizing the Lightning Platform:

  • Programmatic customization
  • Declarative customization
  • Process Builder action types
  • The Workflow and Approvals action types
  • General use cases for programmatic customization

Let's look at the features and capabilities for programmatic customization in the Lightning Platform.

Programmatic customization

The good news, if you do not enjoy being tested on coding skills, is that the Salesforce Certified Platform App Builder exam contains no questions on how to write code using programmatic customization.

While you will not be expected to know how to program or be given any questions on writing code, you are expected to have an understanding of how code can be used in the Salesforce Lightning Platform. You must have an awareness of what code options exist in the Salesforce Lightning Platform, and this is particularly important when app builders are faced with a need to build or implement the most appropriate solution.

The programmatic options for customizing the Salesforce Lightning Platform include the following:

  • Apex Code: Apex is an object-oriented programming language that executes on the Salesforce Lightning Platform. Similar to Java, the Apex programming language allows the building of functionality that executes transaction control statements within the server.
  • Apex Triggers: Apex triggers are used to create custom actions that execute before or after events such as record creation, record update, and record deletes, and are used when there is no user input.
  • Visualforce Pages: Visualforce pages comprise sets of tags that connect to the server and render back to the web user interface. The tags are associated with standard or custom controllers that are used to connect to the database.
  • Lightning Components: Lightning components are available in two programming models. Firstly, there is the Aura Components programming model, and secondly, there is Lightning Web Components (LWC), which uses a lightweight framework with JavaScript and HTML.

The advantages of using programmatic customization include the following:

  • Flexibility
  • Reusability
  • User interface complexity
  • Integration

While there are benefits, there are also disadvantages, such as the following:

  • Additional testing requirements
  • Higher development costs
  • A potential lack of scalability
  • Less responsiveness to change
  • Additional risk when deploying changes
  • A lack of availability of developer skills

Having outlined the options for code and the advantages and disadvantages, we will now outline the options for declarative customization.

Declarative customization

There are several terms you may be aware of that are used to describe declarative customization. Some of those terms are Clicks not Code, Point and Click, Drag and Drop, Click v Code, and No Code Development.

What these terms mean with respect to the Salesforce Lightning Platform is that they allow solutions to be built by individuals without the need to write code.

Let's look at the options for building apps using declarative development. We will look in far more detail at building solutions using declarative development tools in Chapter 7, Building Business Process Automation.

The declarative options for customizing the Salesforce Lightning Platform include the following:

  • Process Builder: Process Builder is a workflow automation tool that allows you to automate business processes and uses a user-friendly visual interface with point-and-click features. The tool supports the building of multiple rules with associated criteria and actions in a single process where actions are fired when new or updated records meet the specified criteria. Process Builder starts when either a record is created or edited, Process Builder is called by another process, or a platform event message is fired.
  • Flow: Flow is a workflow automation tool that allows you to automate business process screen wizards or complex background processes that use extensive branching logic.

    Like Process Builder, flows are created using Flow Builder, a user-friendly visual interface with point-and-click features. Flows can be either screen flows with a user interface or autolaunched flows that do not have a screen.

  • Approvals: Approval processes allow the configuration of steps that are used to approve or reject records that have been submitted for approval. Approval processes include entry criteria and designated uses that must be met to allow approval during the steps. In addition, approval processes allow the creation of actions that are triggered as a record is submitted, approved, rejected, or recalled.
  • Workflow: Workflow rules initiate workflow actions when specified conditions (or criteria) have been met. Workflow actions can be set to execute immediately or can be set using the time-dependent feature that results in the workflow actions being executed at a future date.

    Automation and editions

    At the time of writing, Process Builder and Flow are available in the following editions: Essentials, Professional, Enterprise, Performance, Unlimited, and Developer. Approvals and Workflow are available in the following editions: Enterprise, Performance, Unlimited, and Developer.

    Reference: https://help.salesforce.com/articleView?id=process_which_tool.htm

Now let's look at the type of actions that can be performed in Process Builder.

Process Builder action types

In Process Builder, the following actions types can be performed:

  • Apex: Apex actions invoke an Apex class with an invocable method.
  • Create a Record: Creates a record – actions allow you to create a record of any supported type.
  • Email Alerts: Email alert actions use an email template that is used to populate the email details that are sent to specified recipients that can be either Salesforce CRM users or external email recipients.
  • Flows: Flow actions enable the triggering of an auto-launched flow.
  • Post to Chatter: This action enables the creation of a Chatter Post.
  • Processes: These actions enable the invocation of a different process.
  • Quick Actions: Quick actions are used to invoke an action.
  • Quip: This action initiates a Quip integration. Quip for Salesforce provides a collaborative document and chat integration within Salesforce. Quip actions are available if you have Quip for Salesforce integration.
  • Send Custom Notifications: This action sends custom notifications, which are used to notify users when important events occur.
  • Submit for Approval: This action enables the automatic submission of an approval process.
  • Update Records: This action enables the update of any related record.

Now let's look at the type of actions that can be carried out in flows.

Flow action types

The process automation actions that can be configured in Flow are separated into two areas: namely Flow Elements and Flow Core Actions. Flow Elements allow the following types of automation to be carried out:

  • Apex Action: Apex actions invoke an Apex class with an invocable method.
  • Subflow: This action enables the triggering of another flow.
  • Create Records: This action enables the creation of either one or multiple records.
  • Get Records: This action gets records based on specified criteria.
  • Delete Records: This action deletes records using the record ID.
  • Update Records: This action enables the update of any related record.
  • Email Alert: Email alert actions use an email template that is used to populate the email details to be sent to specified recipients, which can be either Salesforce CRM users or external email recipients.
  • Core Action: There are many types of core actions, such as Email Alerts, Submit for Approval, and so on, and these are listed in the next section.

Nested within the Flow Elements Flow Core Action options, the following types of actions can be performed:

  • Update Records: This action enables the update of any related record.
  • Activate Session-Based Permission Set: This action activates a session-based permission set for the user that is running the flow.
  • Deactivate Session-Based Permission Set: This action deactivates a session-based permission set for the user that is running the flow.
  • Post to Chatter: This action enables the creation of a Chatter Post.
  • Action: Quick actions are used to invoke an action.
  • Send Custom Notification: This action sends custom notifications, which are used to notify users when important events occur.
  • Email Alerts: This action sends an email using a subject, body, and email recipients.
  • Submit for Approval: This action enables the automatic submission of an approval process.

Now let's look at the type of actions that can be carried out in Workflow and approvals.

Workflow and approval action types

There are different Workflow and approval action types, which are listed here:

  • Email Alerts: Email alerts actions use an email template that is used to populate the email details to be sent to specified recipients, which can be either Salesforce CRM users or external email recipients.
  • Field Updates: Field update actions allow you to specify a field for update and set a new value for it. The field's update action depends on the data type of the field, where you can choose to apply a specific value, clear the field, or calculate a value according to criteria or a derived formula that you can specify.
  • Tasks: Task actions enable the assignment of tasks to a user that you can specify. You would also specify the Subject, Status, Priority, and Due Date of the task. Tasks can be assigned on their own, but you can also combine them with an email alert to inform the user.
  • Send Action: Send actions are used to automatically send email messages at the end of an approval process.
  • Outbound Messages: This an action that can be activated by both workflows and approvals, which sends information to a web URL endpoint. The outbound message contains the data in specified fields in what is known as a SOAP message to the endpoint.

Having previously looked at the advantages and disadvantages of building solutions using code, we will now consider one of the often-difficult choices when working with the Lightning Platform, namely, when to use programmatic solutions and when to use declarative development.

In reality, in most Salesforce instances – certainly ones that have been customized over a reasonable period of time – there is no distinct separation between ones customized declaratively and ones that contain programmatic solutions. There tends to be a mix of both methods of customization both at the org level and also at the solution level.

We will now look at how we can assess the most appropriate method of customization for the types of requirements that app builders may encounter. Let's now identify the boundaries of declarative customization and the general use cases for programmatic customization.

General use cases for programmatic customization

As we learned previously in this chapter, Salesforce pioneered the ability to provide a platform that can be developed by using code and non-coded mechanisms. The platform allows an underlying architecture that supports business processing and data storage – metadata key building blocks needed are to build applications.

Although there are no hard and fast rules on when to use code, the specific use case and the resources available help to determine the best approach, and in other situations, there are some solutions that must be built with code as this is the only option.

Here are some general use cases for choosing programmatic solutions:

  • Integration using the API to connect with other systems
  • When highly complex user interfaces are required
  • When large data volumes need to be batched and processed in the background
  • When the out-of-the-box standard object features need to be extended
  • When the out-of-the-box automation tools do not have the necessary actions

Here are some specific use cases where out-of-the-box automation tools lack the capability and that require a programmatic solution:

  • When records need to be undeleted
  • When multiple types of records need to be simultaneously created or updated
  • When adding Apex to flows or Process Builder
  • When adding Lightning components to flows

Often, adding Lightning components to flows or including Apex in Process Builder offers a far better solution than attempting to build a solution either entirely in code or entirely using declarative tools.

Avoid building complex flows

It is often better to avoid building complex flows that push the boundaries of the Flow Builder tool and are difficult to manage, and to instead use a programmatic solution.

Programmatic solutions such as Lightning components and apps can be sourced on Salesforce AppExchange, which we will now explore.