Creating a First-Generation Package

Updated 2 months ago by Copado Solutions

If you have already completed all the DX requirements and have gone through the Packages article to learn more about packages, you can go ahead and create your package.

To create a Salesforce package, follow these steps:

  1. Open the Packages tab and click on New to create a Package record:
    1. Select the Salesforce Package record type:
    Please note that you will need to assign the Package Artifact layout to the Salesforce Package record type for your user if you haven't done it yet.
    1. Select First-Generation Package from the Package Type picklist field.
    2. Select the org credential of the environment that holds the metadata that will be added to the package. 
    3. Select a target dev hub org, which is the org credential of the dev hub that will be used to create and store the package.
    4. Leave the Package Repository field empty.
    5. Click on Save.
      Your record should look like this:

The next steps will vary depending the type of package you want to create.

If you are creating this record for  a first-generation managed package, follow these steps:

  1. Open the Package record you created in the first step.
  2. Navigate to the Package Versions related list and click on New.

    If the New button is not available, follow the steps below to add it to the layout:
    1. Navigate to Setup > Object Manager.
    2. Go to the Package object and click on Page Layouts.
    3. Select the Package Artifact Layout and scroll down to the Package Versions related list.
    4. Edit the related list and add New to the Buttons section.
  3. Give your package version a name and add the package Id, which you can take from the URL (https://eu31.lightning.force.com/lightning/r/copado__Artifact__c/a035I000000qWG0QAM/view) to the Package Version Id and Subscriber Version Id fields.
  4. Click on Save:

If you are creating this record for a first-generation unmanaged package, proceed to the steps below:

  1. Navigate to the Package record you created in the first step.
  2. Click on Manage Package Content:
  3. From the grid, select the unmanaged package you will use for the package:
    If you have not yet created the unmanaged package, follow these steps:
    1. Navigate to Setup.
    2. Select Package Manager.
    3. Click on New under Packages

    If the package is new, click on Refresh List of Packages.
  4. If the package has a key, add it in the Package Key field.
  5. Click on Save


How did we do?