Newer Version Available
PackagePushJob
Represents an individual push job for upgrading a package in an org
from one version to another version. There can be multiple push jobs created for one
push request. For example, if you want to upgrade five orgs as part of one push, you
have one PackagePushRequest record and five PackagePushJob records.
Supported Calls
create(), describeSObjects(), query(), retrieve(), update(), upsert()
Fields
| Field Name | Details |
|---|---|
| DurationSeconds |
|
| EndTime |
|
| PackagePushRequestId |
|
| StartTime |
|
| Status |
|
| SubscriberOrganizationKey |
|
Usage
Suppose that you want to push version 3.4.6 of your package to all orgs. You’ve already identified the orgs eligible for the upgrade by using MetadataPackageVersion and created the push request using PackagePushRequest. Now let’s write some code to create a push job for each eligible org.
This code sample uses the Web Services Connector (WSC).
Or, if you’re using REST API, submit a POST request to the PackagePushJob sObject
endpoint, as in the following example. SOAP API is also supported. This example
returns the push job ID (starting with 0DX) that is required to query the status of
the
job.
Checking the Status of a Push Job
To check the job status, simply query the Status field. For
example:
Here’s an example in Java.
You can also continuously poll the job status until the job is done. The following
Java example polls the status every 10
seconds.