System Properties

Updated 1 month ago by Copado Solutions

Introduction

System properties are values that are stored in Copado and can be referenced in a function or a Salesforce Flow deployment step. 

To store these values, Copado has designed a System Property object where you can store values that can run on different contexts and be linked to different records such as a pipeline, a user or an environment.

Please note that each property can only be linked to one parent record, which will be recorded in the Parent Id field.

System properties can be encrypted. All you need to do is select the Is Sensitive checkbox on the System Property record, and Copado will store the value in a protected custom metadata as an encrypted value and link it to the system property.

Let’s take a look at each of the system properties you can configure.

System Properties

Running User as a Context

User

  • {$User.Property.LogLevel}
    • Value of a System Property record linked to the user executing the function.
Deployment Job as a Context

Pipeline (if the deployment has a lookup value to promotion)

  • {$Pipeline.Property.DBName}
    • Property linked to the Pipeline record linked to the promotion.
  • {$Pipeline.MyField__c}
    • Field value of the Pipeline record linked to the promotion.

Source Environment

  • {$Source.Property.DBName}
    • Property linked to the source environment record of the deployment.
  • {$Source.MyField__c}
    • Field value of the source environment record of the deployment.
  • {$Source.MyLookup__r.MyOtherField__c}
    • Parent record field value in the source environment record of the deployment.

Destination Environment

  • {$Destination.Property.DBName}
    • Property linked to the destination environment record of the deployment job.
  • {$Destination.MyField__c}
    • Field value of the destination environment record of the deployment job.
  • {$Destination.MyLookup__r.MyOtherField__c}
    • Parent record field value in the destination environment record of the deployment job.

Previous Step (if any)

  • {$PrevStep.MyField__c}
    • Field value of the previous step record of the deployment.
  • {$PrevStep.JSONResult.branch_name}
    • JSONResult parameter value in the previous step record of the deployment.
  • {$PrevStep.JSONResult.branch.name}

Any Record as a Context
  • {$RecordId.MyField__c}
    • Field value of the record Id used as a context.
  • {$RecordId.MyLookup__r.MyOtherField__c}
    • Parent record field value of the record Id used as a context.
  • {$RecordId.Repository.Credential}
    • Credentials of a Git Repository record linked to the record Id used as a context. The credentials are sent in JSON format containing multiple values depending on the authentication type:
      • HTTPS
        • Username
        • Password
        • URL
        • Extra Headers
      • SSH
        • URL
        • SSH Key
        • Extra Headers

For more information about system properties and how to configure one, check out the article How to Create a System Property.


How did we do?