buildSalesforce

buildSalesforce

Builds a Salesforce artifact to be deployed to Salesforce Organizations or sandboxes.

Supports Full or Package-Based projects. Local developer files like jsconfig.json and .eslintrc.json are automatically excluded from the artifact generated.

In Full Deployment mode, it supports:

  • Building an existing Salesforce zip file from the FD_TEMP_DIR (by copying it to the artifacts folder)

  • Building an existing directory structure with a package.xml in it.

  • In this mode, all object types that are supported by the Salesforce API are supported by FlexDeploy.

In Package-Based mode, it supports:

  • Building a package structure from files checked out of SCM when no package.xml is present. It is automatically created from the items selected for deployment.

  • Building a package structure from files stored in a Salesforce Organization or Sandbox.

  • Building a package structure with a mixture of SCM and Salesforce-sourced files. The package.xml file is generated automatically to upload the correct information to Salesforce.

  • In this mode, see the Supported Salesforce Metadata Types list for information on what types of objects are supported.

  • Downloading Data from Org or sandbox for given objects

Target Properties

Property Name

Property Code

Required

Description

Property Name

Property Code

Required

Description

Salesforce Account Code

FDSF_ACCOUNT_CODE

Yes

Salesforce Account with all the required properties like User, Password, Client Id, etc.

Salesforce API Version

FDSF_API_VERSION

No

The Salesforce API version to target.

Specifies the Salesforce API version to use(e.g., 64.0, 63.0)..

This property is optional. If left blank, FlexDeploy will automatically detect and use the latest supported API version from your Salesforce Org at runtime using a REST API call - up to the default version from FlexDeploy and the maximum supported by your Salesforce organization.

See FlexDeploy Salesforce Version Matrix for more information.

Salesforce Cli Path

FDSF_CLI_PATH

No

The Salesforce CLI Path. (Eg: C:\Program Files\Salesforce CLI\bin)

Cloud Account Properties

Property Name

Property Code

Required

Description

Property Name

Property Code

Required

Description

Salesforce User Email

FDSFCA_USER

Yes

Authentication User Email.

Salesforce Password

FDSFCA_PASSWORD

No

The Salesforce password for Salesforce User.

If you are using a security token, paste the 25-digit token value to the end of your password.

If you don't know the security token, see http://salesforce.stackexchange.com/questions/95259/where-is-reset-security-token-option-in-salesforce

JWT Key File

FDSFCA_SERVER_KEY_FILE

No

Path to a file containing the private key

Client Id

FDSFCA_CLIENT_ID

No

OAuth client ID (sometimes called the consumer key)

Client Secret

FDSFCA_CLIENT_SECRET

No

OAuth client secret (sometimes called the consumer secret)

Development Org Type

FDSFCA_ORG_TYPE

No

Enter Org type for Development Environment. Eg: Sandbox or DevHub or Developer

Since version 9.0.0.8, this property has been updated to a List data type and now accepts the following values

  • Production org

  • Sandbox

  • Developer Edition

  • Developer Edition with DevHub

  • Scratch org

  • Other

Salesforce URL

FDSFCA_URL

No

The login URL of the instance the org lives on

Sandbox Name

FDSFCA_SANDBOX

No

The name of a Sandbox to access.

Note - It is required when Development Org Type is selected to Sandbox

Security Token

FDSFCA_SECURITY_TOKEN

No

Salesforce security token for Salesforce User. Refer Salesforce Password description.

Project Properties

Property Name

Property Code

Required

Description

Property Name

Property Code

Required

Description

Granular Salesforce Object Types

FDSF_GRANULAR_DEPLOYMENT_OBJECTS

No

Salesforce Object Types to be used with granular support. Values are separated by commas. As of now the supported object for this is Custom Labels. 

Each custom label will be a separate file when pull from Salesforce and stored as an individual file in the SCM (GIT repository). During the build, the individual files will be merged and will generate a new file with all the custom labels. 

Source Format

FDSF_SOURCE_FORMAT

No

Source format of the Salesforce project. Salesforce DX is only used when the project is connected to an SCM. Dropdown shows 2 values.

  • Metadata API (Default)

  • Salesforce DX

SFDX Source Path

FDSF_SFDX_SOURCE_PATH

No

SFDX Source Path. Example of source path /force-app/main/default

Discover Files Excludes

FD_PARTIAL_FILE_EXCLUDES

No

Controls files excluded from Project Files. Enter expressions separated by ##. Leave empty to select all files. Begin or end the expression with * for simple wildcards. Otherwise,
regex is used. (e.g. /java/*##*.java##*person*##/java/.*[tT]est.*\.java)

Inputs

Input Name

Input Code

Required

Description

Input Name

Input Code

Required

Description

Salesforce Account

FDSF_INP_ACCOUNT_CODE

No

The Account to retrieve files / data for the files Sourced from Salesforce. Target property will be used, if not provided.

Package Name(s)

FDSF_PACKAGE_NAME

No

Package Name(s) to build. Separate Package Names with commas.

Generate Package XML

FDSF_INP_GENERATE_PACKAGE_XML

No

Determine if package.xml is to be generated in Full Build operation. Ignored in Package-Based projects

Default value is true

Artifacts

This operation produces artifacts that will be stored in the artifacts repository.

Endpoint Selection

This operation will select all available endpoints associated to the Target.

Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.

Special Considerations

Currently, when using Package-Based Projects, some objects show up as two separate files in the file listing screen. If building from SCM, users must select both of them for the deployment to succeed. If building from Salesforce, or using the Full Deployment model, this is unnecessary.

The following macros are not currently supported in the footer:
  • style