Newer Version Available

This content describes an older version of this product. View Latest

DeployResult Class

Represents the results of a metadata deployment.

Namespace

Metadata

Usage

After an asynchronous metadata deployment finishes, Salesforce provides an instance of Metadata.DeployResult in a call to your implementation of handleResult() in your Metadata.DeployCallback class.

Example

1public void handleResult(Metadata.DeployResult result,
2                         Metadata.DeployCallbackContext context) {
3    if (result.status == Metadata.DeployStatus.Succeeded) {
4        // Deployment was successful
5    } else {
6        // Deployment was not successful
7    }
8}

DeployResult Properties

The following are properties for DeployResult.

canceledBy

ID of the user who canceled the queued deployment.

Signature

public String canceledBy {get; set;}

Property Value

Type: String

canceledByName

Full name of the user who canceled the queued deployment.

Signature

public String canceledByName {get; set;}

Property Value

Type: String

checkOnly

Indicates whether the deployment checked only the validity of the deployed files without making changes in the org. A check-only deployment does not deploy components or change the org in any way.

Signature

public Boolean checkOnly {get; set;}

Property Value

Type: Boolean

completedDate

Date and time for when the deployment process ended.

Signature

public Datetime completedDate {get; set;}

Property Value

Type: Datetime

createdBy

ID of the user who created the deployment job.

Signature

public String createdBy {get; set;}

Property Value

Type: String

createdByName

Full name of the user who created the deployment job.

Signature

public String createdByName {get; set;}

Property Value

Type: String

createdDate

Date and time the deployment job was first queued.

Signature

public Datetime createdDate {get; set;}

Property Value

Type: Datetime

details

Provides the details for components in a completed deployment.

Signature

public Metadata.DeployDetails details {get; set;}

Property Value

Type: Metadata.DeployDetails

done

Indicates whether Salesforce finished processing the deployment.

Signature

public Boolean done {get; set;}

Property Value

Type: Boolean

errorMessage

Message corresponding to the values in the errorStatusCode property, if any.

Signature

public String errorMessage {get; set;}

Property Value

Type: String

errorStatusCode

If an error occurs during deployment, a status code is returned. The message corresponding to the status code is returned in the errorMessagefield property.

Signature

public String errorStatusCode {get; set;}

Property Value

Type: String

For a description of each status code value, see Core Data Types Used in API Calls in the SOAP API Developer Guide.

id

ID of the deployment job.

Signature

public Id id {get; set;}

Property Value

Type: Id

ignoreWarnings

Specifies whether a deployment continues, even if the deployment generates warnings.

Signature

public Boolean ignoreWarnings {get; set;}

Property Value

Type: Boolean

lastModifiedDate

Date and time of the last update for the deployment process.

Signature

public Datetime lastModifiedDate {get; set;}

Property Value

Type: Datetime

messages

A list of all the detail messages for a deployment.

Signature

Removed in API version 29.0 and later.

Note

public List<Metadata.DeployMessage> messages {get; set;}

Property Value

Type: List<Metadata.DeployMessage>

numberComponentErrors

The number of components that generated errors during the deployment.

Signature

public Integer numberComponentErrors {get; set;}

Property Value

Type: Integer

numberComponentsDeployed

The number of components deployed in the deployment process. Use this value with the numberComponentsTotal property to get an estimate of the deployment’s progress.

Signature

public Integer numberComponentsDeployed {get; set;}

Property Value

Type: Integer

numberComponentsTotal

The total number of components in the deployment. Use this value with the numberComponentsDeployed property to get an estimate of the deployment’s progress.

Signature

public Integer numberComponentsTotal {get; set;}

Property Value

Type: Integer

rollbackOnError

Indicates whether any failure causes a complete rollback (true) or not (false) of the deployment.

Signature

public Boolean rollbackOnError {get; set;}

Property Value

Type: Boolean

startDate

Date and time the deployment process began.

Signature

public Datetime startDate {get; set;}

Property Value

Type: Datetime

stateDetail

Indicates which component is being deployed.

Signature

public String stateDetail {get; set;}

Property Value

Type: String

status

Indicates the current state of the deployment.

Signature

public Metadata.DeployStatus status {get; set;}

Property Value

Type: Metadata.DeployStatus

success

Indicates whether the deployment was successful (true) or not (false).

Signature

public Boolean success {get; set;}

Property Value

Type: Boolean

DeployResult Methods

The following are methods for DeployResult.

clone()

Makes a duplicate copy of the Metadata.DeployResult.

Signature

public Object clone()

Return Value

Type: Object