Contains information about the success or failure of the associated deploy() call.
The asynchronous metadata call checkDeployStatus() returns a DeployResult object.
In API version 29.0, Salesforce moved several properties from the AsyncResult object to the DeployResult object to improve the process for getting information about deployments. For more information about these changes, see deploy().
Fields
For API version 29.0 and later, the DeployResult object has these properties.
id
Type: ID
Description: ID of the component being deployed.
canceledBy
Type: ID
Description: The ID of the user who canceled the deployment. This field is available in API version 30.0 and later.
canceledByName
Type: string
Description: The full name of the user who canceled the deployment. This field is available in API version 30.0 and later.
checkOnly
Type: boolean
Description: Indicates whether this deployment is used to check the validity of the deployed files without changing the organization (true) or not (false). A check-only deployment doesn’t deploy any components or change the organization in any way.
completedDate
Type: dateTime
Description: Timestamp for when the deployment process ended.
createdBy
Type: ID
Description: The ID of the user who created the deployment. This field is available in API version 30.0 and later.
createdByName
Type: string
Description: The full name of the user who created the deployment. This field is available in API version 30.0 and later.
createdDate
Type: dateTime
Description: Timestamp for when the deploy() call was received.
deployExtensionResults
Type: DeployExtensionResult[]
Description: Provides the status of each deployment extension that ran as part of the deployment. Each entry represents one extension type. If no deployment extensions ran, this field is empty. This field is available in API version 67.0 and later.
details
Type: DeployDetails[]
Description: Provides the details of a deployment that is in-progress or ended, if the includeDetails parameter is set to true in the checkDeployStatus() call.
done
Type: boolean
Description: Indicates whether the server finished processing the deploy() call for the specified id.
errorMessage
Type: string
Description: Message corresponding to the values in the errorStatusCode field, if any.
errorStatusCode
Type: string
Description: If an error occurred during the deploy() call, a status code is returned, and the message corresponding to the status code is returned in the errorMessage field. For a description of each StatusCode value, see StatusCode in the SOAP API Developer Guide.
ignoreWarnings
Type: boolean
Description: Optional. Defaults to false. Specifies whether a deployment continues even if the deployment generates warnings. Don’t set this argument to true for deployments to production organizations.
lastModifiedDate
Type: dateTime
Description: Timestamp of the last update for the deployment process.
numberComponentErrors
Type: int
Description: The number of components that generated errors during this deployment.
numberComponentsDeployed
Type: int
Description: The number of components deployed in the deployment process. Use this value with the numberComponentsTotal value to get an estimate of the deployment’s progress.
numberComponentsTotal
Type: int
Description: The total number of components in the deployment. Use this value with the numberComponentsDeployed value to get an estimate of the deployment’s progress.
numberTestErrors
Type: int
Description: The number of Apex tests that have generated errors during this deployment.
numberTestsCompleted
Type: int
Description: The number of completed Apex tests for this deployment. Use this value with the numberTestsTotal value to get an estimate of the deployment’s test progress.
numberTestsTotal
Type: int
Description: The total number of Apex tests for this deployment. Use this value with the numberTestsCompleted value to get an estimate of the deployment’s test progress. The value in this field isn’t accurate until the deployment has started running tests for the components being deployed.
numFiles
Type: int
Description: The total number of files included in this deployment. This field is available in API version 64.0 and later.
runTestsEnabled
Type: boolean
Description: Indicates whether Apex tests were run as part of this deployment (true) or not (false). Tests are either automatically run as part of a deployment or can be set to run in DeployOptions for the deploy() call. For information on when tests are automatically run, see Running Tests in a Deployment. This field is available in API version 30.0 and later.
rollbackOnError
Type: boolean
Description: Optional. Defaults to true. Indicates whether any failure causes a complete rollback (true) or not (false). If false, whatever set of actions can be performed without errors are performed, and errors are returned for the remaining actions. This parameter must be set to true if you’re deploying to a production organization.
startDate
Type: dateTime
Description: Timestamp for when the deployment process began.
stateDetail
Type: string
Description: Indicates which component is being deployed or which Apex test class is running.
Description: Indicates the current state of the deployment.
Possible values:
Pending
InProgress
FinalizingDeploy
FinalizingDeployFailed
Succeeded
SucceededPartial
Failed
Canceling
Canceled
success
Type: boolean
Description: Indicates whether the deployment was successful (true) or not (false).
zipSize
Type: long
Description: The size of the unzipped deployment folder in bytes. This field is available in API version 64.0 and later.
DeployDetails
These fields provide more information for the details field of the DeployResult object, if the includeDetails parameter is set to (true in the deploy() call.
While a deployment is still in-progress, the DeployDetails object only contains componentFailures data. After the deployment process finishes, the other fields populate with the data for the entire deployment.
Note
componentFailures
Type: DeployMessage[]
Description: One or more DeployMessage objects containing deployment errors for each component.
componentSuccesses
Type: DeployMessage[]
Description: One or more DeployMessage objects containing successful deployment details for each component.
Description: If the performRetrieve parameter was specified for the deploy() call, a retrieve() call is performed immediately after the deploy() process completes.
runTestResult
Type: RunTestResult
Description: If tests were run for the deploy() call, this field contains the test results.
DeployExtensionResult
Each DeployExtensionResult object contains the status of a single deployment extension returned by checkDeployStatus(). This object is available in API version 67.0 and later.
message
Type: string
Description: Optional. An error message if the extension failed, or a progress update if the extension is in progress.
status
Type: DeployExtensionStatus
Description: The status of the deployment extension. Valid values are:
New
InProgress
Succeeded
Failed
type
Type: string
Description: The type identifier of the deployment extension.
Properties
For API version 28.0 and earlier, the DeployResult object has the following properties.
id
Type: ID
Description: ID of the component being deployed.
messages
Type: DeployMessage[]
Description: Contains information about the success or failure of a deploy() call.
Description: If the performRetrieve parameter was specified for the deploy() call, a retrieve() call is performed immediately after the deploy() process completes. This field contains the results of that retrieval.
runTestResult
Type: RunTestResult
Description: If tests were run for the deploy() call, this field contains the test results.
success
Type: boolean
Description: Indicates whether the deployment was successful (true) or not (false).
DeployMessage
Each DeployResult object contains one or more DeployMessage objects. Each DeployMessage object contains information about the deployment success or failure of a component in the deployment .zip file:
As of the Spring ‘20 release, only authenticated users can access DeployMessage objects.
changed
Type: boolean
Description: If true, the component was changed as a result of this deployment. If false, the deployed component was the same as the corresponding component already in the organization.
columnNumber
Type: int
Description: A text file represents each component. If an error occurred during deployment, this field represents the column of the text file where the error occurred.
componentType
Type: string
Description: The metadata type of the component in this deployment. This field is available in API version 30.0 and later.
created
Type: boolean
Description: If true, the component was created as a result of this deployment. If false, the component was either deleted or modified as a result of the deployment.
createdDate
Type: dateTime
Description: The date and time when the component was created as a result of this deployment. This field is available in API version 30.0 and later.
deleted
Type: boolean
Description: If true, the component was deleted as a result of this deployment. If false, the component was either new or modified as a result of the deployment.
fileName
Type: string
Description: The name of the file in the .zip file used to deploy this component.
fullName
Type: string
Description: The full name of the component. Inherited from Metadata, this field is defined in the WSDL for this metadata type. It must be specified when creating, updating, or deleting. See createMetadata() to see an example of this field specified for a call.
id
Type: ID
Description: ID of the component being deployed.
lineNumber
Type: int
Description: A text file represents each component. If an error occurred during deployment, this field represents the line number of the text file where the error occurred.
problem
Type: string
Description: If an error or warning occurred, this field contains a description of the problem that caused the compile to fail.
problemType
Type: DeployProblemType (enumeration of type string)
Description: Indicates the problem type. The problem details are tracked in the problem field. This field is available in API version 18.0 and later. Before version 18.0, there was no distinction between warnings and errors. All problems were treated as errors and prevented a successful deployment.
Possible values:
Warning
Error
success
Type: boolean
Description: Indicates whether the component was successfully deployed (true) or not (false).
RunTestsResult
The RunTestsResult object contains this object. It contains information about whether or not the compile of the specified Apex and run of the unit tests was successful.
A RunTestsResult object has the following properties
apexLogId
Type: string
Description: The ID of an ApexLog object that is created at the end of a test run. The ApexLog object is created if there is an active trace flag on the user running an Apex test, or on a class or trigger being executed.
This field is available in API version 35.0 and later.
codeCoverage
Type: CodeCoverageResult[]
Description: An array of one or more CodeCoverageResult objects that contains the details of the code coverage for the specified unit tests.
codeCoverageWarnings
Type: CodeCoverageWarning[]
Description: An array of one or more code coverage warnings for the test run. The results include both the total number of lines that could have been executed, as well as the number, line, and column positions of code that was not executed.
failures
Type: RunTestFailure[]
Description: An array of one or more RunTestFailure objects that contain information about the unit test failures, if there are any.
Description: An array of warnings generated by test runs that executed flows. This field is available in API version 44.0 and later.
numFailures
Type: int
Description: The number of failures for the unit tests.
numTestsRun
Type: int
Description: The number of unit tests that were run.
successes
Type: RunTestSuccess[]
Description: An array of one or more RunTestSuccess objects that contain information about successes, if there are any.
totalTime
Type: double
Description: The total cumulative time spent running tests, in milliseconds. This can be helpful for performance monitoring.
CodeCoverageResult
The RunTestResult object contains this object. It contains information about whether or not the compile of the specified Apex and run of the unit tests was successful.
dmlInfo
Type: CodeLocation[]
Description: For each class or trigger tested, for each portion of code tested, this property contains the DML statement locations, the number of times the code was executed, and the total cumulative time spent in these calls. This can be helpful for performance monitoring.
id
Type: ID
Description: The ID of the CodeLocation . The ID is unique within an organization.
locationsCovered
Type: CodeLocation[]
Description: Identifies the code locations for each class or trigger tested. Includes the line and column of the code tested and the number of times the code was executed. This field is available in API version 68.0 and later.
locationsNotCovered
Type: CodeLocation[]
Description: For each class or trigger tested, if any code is not covered, the line and column of the code not tested, and the number of times the code was executed.
methodInfo
Type: CodeLocation[]
Description: For each class or trigger tested, the method invocation locations, the number of times the code was executed, and the total cumulative time spent in these calls. This can be helpful for performance monitoring.
name
Type: string
Description: The name of the class or trigger covered.
namespace
Type: string
Description: The namespace that contained the unit tests, if one is specified.
numLocations
Type: int
Description: The total number of code locations.
numLocationsNotCovered
Type: int
Description: The number of code locations not covered by any class or trigger.
soqlInfo
Type: CodeLocation[]
Description: For each class or trigger tested, the location of SOQL statements in the code, the number of times this code was executed, and the total cumulative time spent in these calls. This can be helpful for performance monitoring.
type
Type: string
Description: Do not use. In early, unsupported releases, used to specify class or package.
CodeCoverageWarning
The RunTestsResult object contains this object. It contains information about the Apex class which generated warnings.
This object has the following properties.
id
Type: ID
Description: The ID of the CodeLocation . The ID is unique within an organization.
message
Type: string
Description: The message of the warning generated.
name
Type: string
Description: The namespace that contained the unit tests, if one is specified.
namespace
Type: string
Description: The namespace that contained the unit tests, if one is specified.
RunTestFailure
The RunTestsResult object returns information about failures during the unit test run.
This object has these properties.
id
Type: ID
Description: The ID of the class which generated failures.
message
Type: string
Description: The failure message.
methodName
Type: string
Description: The name of the method that failed.
name
Type: string
Description: The name of the class that failed.
namespace
Type: string
Description: The namespace that contained the class, if one was specified.
seeAllData
Type: boolean
Description: Indicates whether the test method has access to organization data (true) or not (false). This field is available in API version 33.0 and later.
stackTrace
Type: string
Description: The stack trace for the failure.
time
Type: double
Description: The time spent running tests for this failed operation, in milliseconds. This can be helpful for performance monitoring.
type
Type: string
Description: Do not use. In early, unsupported releases, used to specify class or package.
FlowCoverageResult
This object contains information about the flow version and the number of elements executed by the test run. This object is available in API version 44.0 and later.
elementsNotCovered
Type: string
Description: List of elements in the flow version that weren’t executed by the test run.
flowId
Type: string
Description: The ID of the flow version. The ID is unique within an org.
flowName
Type: string
Description: The name of the flow that was executed by the test run.
flowNamespace
Type: string
Description: The namespace that contains the flow, if one is specified.
numElements
Type: int
Description: The total number of elements in the flow version.
numElementsNotCovered
Type: int
Description: The number of elements in the flow version that weren’t executed by the test run
processType
Type: FlowProcessType (enumeration of type string)
Description: The process type of the flow version.
FlowCoverageWarning
This object contains information about the flow version that generated warnings. This object is available in API version 44.0 and later.
flowId
Type: string
Description: The ID of the flow version that generated the warning.
flowName
Type: string
Description: The name of the flow that generated the warning. If the warning applies to the overall test coverage of flows within your org, this value is null.
flowNamespace
Type: string
Description: The namespace that contains the flow, if one was specified.
message
Type: string
Description: The message of the warning that was generated.
RunTestSuccess
The RunTestsResult object returns information about successes during the unit test run.
This object has these properties.
id
Type: ID
Description: The ID of the class which generated the success.
methodName
Type: string
Description: The name of the method that succeeded.
name
Type: string
Description: The name of the class that succeeded.
namespace
Type: string
Description: The namespace that contained the unit tests, if one is specified.
seeAllData
Type: boolean
Description: Indicates whether the test method has access to organization data (true) or not (false). This field is available in API version 33.0 and later.
time
Type: double
Description: The time spent running tests for this operation. This can be helpful for performance monitoring.
CodeLocation
The RunTestsResult object contains this object in a number of fields.
This object has these properties.
column
Type: int
Description: The column location of the Apex tested.
line
Type: int
Description: The line location of the Apex tested.
numExecutions
Type: int
Description: The number of times the Apex was executed in the test run.
time
Type: double
Description: The total cumulative time spent at this location. This can be helpful for performance monitoring.