Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

salesforcetechbook/SampleProject

Open more actions menu

Repository files navigation

Commands for creating an Unlocked Package

Authorize DevHub

sfdx force:auth:web:login -d -a DevHub
here DevHub is an alias of Salesforce instance where we enable "DevHub and Unlocked Packages and Second-Generation Managed Packages"

Check sfdx-project.json

{ "packageDirectories": [ { "path": "force-app", "default": true } ], "namespace": "", "sfdcLoginUrl": "https://login.salesforce.com", "sourceApiVersion": "50.0" }

Create the Package

sfdx force:package:create --name testunlocked --description "testunlocked package" --packagetype Unlocked --path force-app --nonamespace --targetdevhubusername DevHub

Create the Package Version

sfdx force:package:version:create -p testunlocked -d force-app -k test1234 --wait 10 -v DevHub --codecoverage --codecoverage Calculate and store the code coverage percentage by running the Apex tests included in this package version. Before you can promote and release a managed or unlocked package version, the Apex code must meet a minimum 75% code coverage requirement. Without this it is not possible to promote.

Promote

sfdx force:package:version:promote -p testunlocked@0.1.0-1 -v DevHub

Intall the package

sfdx force:package:install --wait 10 --publishwait 10 --package testunlocked@0.1.0-1 -k test1234 -r -u PackageDemoOrg

here PackageDemoOrg is alias of Salesforce instace where we want to install our package

Salesforce DX Project: Next Steps

Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started.

How Do You Plan to Deploy Your Changes?

Do you want to deploy a set of changes, or create a self-contained application? Choose a development model.

Configure Your Salesforce DX Project

The sfdx-project.json file contains useful configuration information for your project. See Salesforce DX Project Configuration in the Salesforce DX Developer Guide for details about this file.

Read All About It

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.