Solutions, Samples, and Tools

Here you'll find links to content, samples, and tools that help you solve specific problems using Functions.

Solutions

Browse our library of solutions that cover all aspects of creating and working with Salesforce Functions. Many solutions include links to sample code that you can use as a starting point for your Function development.

Access Org Data From a Function

Use the Salesforce SDKs, along with other standard Salesforce APIs, to access org resources. See the following for more information and examples:

Manage Transactions in your Function

Functions, unlike Apex, don't automatically handle data transactions for you. Transactions are helpful in making sure all related data changes are made at the same time, and in a way that can be undone if necessary. To manage transactions in a Function, use the UnitOfWork SDK class. See the following for more details:

Developing JavaScript and TypeScript Functions

Use JavaScript or TypeScript along with your favorite Node frameworks to build a Function that can be invoked from your org.

Developing Java Functions

Use Java and your favorite Java frameworks to build a Function that can be invoked from your org.

Migrating Apex Code to Functions

Do you have Apex code that is hitting Apex compute limits? Transition your Apex code to a Function using patterns and best practices, and take advantage of elastic auto-scaling in Salesforce Functions compute environments.

Running and Debugging Functions Locally

Before you deploy your Function, you can run and debug it locally.

Testing Functions

Learn how to integrate your Function code and Function invocation code in your testing pipeline.

Understanding Functions and Application Lifecycle Management

Like any Salesforce org custom development, you need to manage how and where Functions are tested and deployed. Functions compute environments are tied to orgs, helping you avoid deploying an in-development Function to a production org.

Deploying Functions to a Salesforce Functions Compute Environment

Before a Function can be invoked from a Salesforce org, it must be deployed to a Salesforce Functions compute environment associated with the org.

  • Overview Understanding Functions projects and compute environments
  • Developer Guide: Deploy a Function Steps for connecting an org with Functions, creating compute environments, and deploying Function projects to compute environments.

Invoking Functions from Your Org

Salesforce makes it easy to invoke a deplyed Function from your org, using Salesforce features you're already familiar with, like Apex. You can invoke a Function from your org synchronously or asynchronously as easily as calling an Apex method.

Configuring Permission Sets for your Functions

When invoked, Functions utilize specific permission sets for data access. You’ll want to understand what permissions you can set, which permission sets to use, and what user role Functions get run as.

All Samples

Check out our library of Functions samples.

Tools and SDKs

Explore the tools Salesforce provides for developing and maintaining Functions.