---
schema_version: "1"
id: acfe5f74b572760cda96e34a7ce6746936277238ef8a9a25d04abc8d6f0cb180
title: Environment (sf_devops__Environment__c)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/salesforcedx/devops-center-dev/guides/devops-center/custom-objects/sforce-api-objects-sf-devops__environment__c.md
canonical_url: https://developer.salesforce.com/docs/platform/devops-center-dev/guide/sforce-api-objects-sf-devops__environment__c.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 0dbfb7223aa530ac2fca368d1e7d8ca2c0a7f90f90baabc3b039ad8241d77e58
products:
  - DevOps Center Developer Guide
  - salesforcedx
---

# Environment (sf_devops__Environment__c)

Represents a connection from DevOps Center to an environment, which currently can be only a Salesforce org. Developers use development environments to do their work. Each pipeline stage has an associated environment. This object is available in all orgs that have DevOps Center installed.

**note:** As DevOps Center grows to support additional types of promotions in the Salesforce ecosystem, this object might change. For example, current fields that are specific to orgs might migrate to a new org-centric custom object. And additional custom objects might be created to represent MuleSoft, Tableau, and so on.

## Supported Calls

`create()`, `delete()`, `describeLayout()`, `describeSObjects()`, `getDeleted()`, `getUpdated()`, `query()`, `retrieve()`, `search()`, `undelete()`, `update()`, `upsert()`

## Fields

|Field|Type|Properties|Description|
|-----|----|----------|-----------|
|`Name`|string|Create, Defaulted on create, Filter, Group, idLookup, Nillable, Sort, Update|Name of this Environment record.|
|`sf_devops__Can_Track_Changes__c`|boolean|Create, Defaulted on create, Filter, Group, Sort, Update|If `true`, specifies that the org that this environment references has source tracking enabled. The default value is `false`.|
|`sf_devops__Expired__c`|boolean|Create, Defaulted on create, Filter, Group, Sort, Update|If `true`, specifies that the org that this environment references has expired. Examples of expired orgs include deleted or expired scratch orgs, or sandboxes that have been refreshed. The default value is `false`.|
|`sf_devops__Last_Revision_Counter__c`|double|Create, Filter, Nillable, Sort, Update|The last revision counter that was pulled from the org that this environment references. DevOps Center uses this value to ensure that it doesn’t pull duplicate records from Source Member Reference.|
|`sf_devops__Named_Credential__c`|string|Create, Filter, Group, Nillable, Sort, Update|Name of the named credential that DevOps Center uses to connect to the org referenced by this environment.|
|`sf_devops__Operation_Result__c`|reference|Create, Filter, Group, Nillable, Sort, Update|Reference to the Async Operation Result record for the current ongoing operation associated with this environment. DevOps Center sets this value when the operation begins and clears it when the operation terminates. This field is a relationship field. Relationship name: sf_devops__Operation_Result__r. Relationship type: Lookup. Refers to: sf_devops__Async_Operation_Result__c.|
|`sf_devops__Org_Id__c`|string|Create, Filter, Group, idLookup, Sort, Update|The 15-character ID of the Salesforce org that this environment is connected to. DevOps Center connects to an org using a URL. When it connects, it compares its org ID with the value in this field. If the two IDs differ, DevOps Center determines that the connected org is a sandbox that has been refreshed.|
|`sf_devops__Project__c`|reference|Create, Filter, Group, Sort|Reference to the project of this environment. This field is a relationship field. Relationship name: sf_devops__Project__r. Relationship type: Master-detail. Refers to: sf_devops__Project__c.|
|`sf_devops__Refresh_Date__c`|dateTime|Create, Filter, Nillable, Sort, Update|Date and time that this sandbox was refreshed from its parent. DevOps Center uses this field and Refresh Source to determine which work items are missing from a recently swapped environment (sandbox).|
|`sf_devops__Refresh_Source__c`|reference|Create, Filter, Group, Nillable, Sort, Update|Reference to the environment in DevOps Center that this sandbox was cloned from. DevOps Center uses this field and Refresh Date to determine which work items are missing from a recently swapped environment (sandbox). This field is a relationship field. Relationship name: sf_devops__Refresh_Source__r. Relationship type: Lookup. Refers to: sf_devops__Environment__c.|
|`sf_devops__Replaces__c`|reference|Create, Filter, Group, Nillable, Sort, Update|Reference to the environment that this environment replaces. This field is a relationship field. Relationship name: sf_devops__Replaces__r. Relationship type: Lookup. Refers to: sf_devops__Environment__c.|
|`sf_devops__Test_Environment__c`|boolean|Create, Defaulted on create, Filter, Group, Sort, Update|If `true`, specifies that DevOps Center uses `test.salesforce.com` to log in to the org. If `false`, DevOps Center uses `login.salesforce.com`. The default value is `true`.|

**See Also**  


-   [Source Member Reference (sf_devops__Source_Member_Reference__c)](https://developer.salesforce.com/docs/platform/devops-center-dev/guide/sforce-api-objects-sf-devops__source-member-reference__c.md)
-   [Async Operation Result (sf_devops__Async_Operation_Result__c)](https://developer.salesforce.com/docs/platform/devops-center-dev/guide/sforce-api-objects-sf-devops__async-operation-result__c.md)
-   [Project (sf_devops__Project__c)](https://developer.salesforce.com/docs/platform/devops-center-dev/guide/sforce-api-objects-sf-devops__project__c.md)
-   [*Salesforce Help*: Manage Environments](https://help.salesforce.com/s/articleView?id=platform.devops_center_manage_environments.htm&type=5)

