SlideShare a Scribd company logo
Bohdan Dovhan
Second-generation managed packages
Bohdan Dovhan
Salesforce Practice Lead
9x Salesforce Certified Specialist
11 years of Development experience
8 years of Salesforce Development
experience
Second-generation managed
package, created, developed and
managed by SFDX CLI
Independent Software Vendor
The company, who releases the managed package
First-generation managed package,
also known as Classic package,
created and managed from
Packaging or Patch Orgs
Salesforce Developer Experience (DX)
is command line interface which
provides tools to manage data and
metadata on Salesforce environments
Organization feature which provides
access to create and manage scratch
orgs and create and manage second
generation packages
Namespace is the prefix used by
managed packages to isolate the
metadata scope
Salesforce acknowledgement of managed
package required for publishing on AppExchange
Salesforce Marketplace where
packages can be found for
installation or published by ISV
Bundled container of code and metadata
which can be published on AppExchange or
shared directly to subscribers
The authoritative source of truth Namespace Org, the org where namespace is
registered
Version Control System, such as Git
or SVN or Mercurial
Packaging Org, the org where the
package is created, built and
registered
Subscriber Org, the org where your
subscriber clients install and use
your package
Patch Org, the org where the patch
version of package is developed and
built
Package snapshot, which is defined by Major,
Minor, Patch and Build version
Feature, which allows to push upgrades
to the subscribers without their consent
Scratch Org is the source driven
temporary disposable organization
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
@namespaceAccessible
public with sharing class JQ {
public class InvalidJSONQueryException extends Exception{}
@testVisible Map<String, Object> internalRepresentation;
@namespaceAccessible
public JQ(String data) {
internalRepresentation = (Map<String, Object>) JSON.deserializeUntyped(data);
}
….
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
sfdx force:package:version:create -d force-app -x -w 60 --skipvalidation –json
echo $(sfdx force:package:version:create -d force-app -x -w 60 --codecoverage --json) >
createPackageVersion.txt
pid=$(cat createPackageVersion.txt | jq '.result.SubscriberPackageVersionId' -r)
sfdx force:package:version:promote -n -p $pid
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
Second-generation managed packages
To gain practice experience, you
may do this workshop on your own
Prerequisites: http://bit.ly/3qPLLyy
Workshop: http://bit.ly/2KT9G0R
References
 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_comparison.htm
 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp.htm
 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_before.htmHealthTech
 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_build_release.htm
 https://developer.salesforce.com/docs/atlas.en-
us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_package.htm#cli_reference_force_package_install
 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/push_upgrade_use_api.htm
 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_publish_appexchange.htm
 https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_known_limitations.htm
 https://developer.salesforce.com/docs/metadata-coverage/53
 https://salesforce.stackexchange.com/questions/318894/guidelines-on-the-process-of-converting-the-first-generation-manage-
package-to-s/318896
 https://salesforce.stackexchange.com/questions/225064/how-do-i-create-a-managed-package-with-sfdx
 https://salesforce.stackexchange.com/questions/236881/how-do-you-create-a-package-version-with-dependencies-on-both-2gp-
and-1st-gen-ma

More Related Content

PPTX
Flutter presentation.pptx
PPTX
Linux network file system (nfs)
PPTX
Synchronous vs Asynchronous Programming
PPTX
Dotnet Basics Presentation
PPTX
Salesforce Integration Patterns
PPTX
PlatForm Event.pptx
PDF
Linux Presentation
PDF
Linux introduction
Flutter presentation.pptx
Linux network file system (nfs)
Synchronous vs Asynchronous Programming
Dotnet Basics Presentation
Salesforce Integration Patterns
PlatForm Event.pptx
Linux Presentation
Linux introduction

What's hot (20)

PPTX
PDF
Android activities & views
PPTX
OAuth with Salesforce - Demystified
PPT
PDF
Introduction to the Salesforce Security Model
PPT
Analysis concepts and principles
PPTX
What and Why Flutter? What is a Widget in Flutter?
PPTX
Dot net assembly
PPTX
Apache web service
PPTX
Linux security introduction
PDF
Introduction to ASP.NET Core
PPT
SFDX Presentation
PPT
Web Servers (ppt)
ODP
Introduction to Ansible
PPTX
Lecture 1 introduction to vb.net
PPTX
Designing Techniques in Software Engineering
PPTX
Jenkins presentation
PPTX
software design
PPTX
Salesforce Streaming event - PushTopic and Generic Events
PPT
Chapter03 Creating And Managing User Accounts
Android activities & views
OAuth with Salesforce - Demystified
Introduction to the Salesforce Security Model
Analysis concepts and principles
What and Why Flutter? What is a Widget in Flutter?
Dot net assembly
Apache web service
Linux security introduction
Introduction to ASP.NET Core
SFDX Presentation
Web Servers (ppt)
Introduction to Ansible
Lecture 1 introduction to vb.net
Designing Techniques in Software Engineering
Jenkins presentation
software design
Salesforce Streaming event - PushTopic and Generic Events
Chapter03 Creating And Managing User Accounts
Ad

Similar to Second-generation managed packages (20)

PPTX
Salesforce DX for admin
PPTX
Salesforce DX for Admin v2
PDF
LC 2022 - Second Generation Packaging
PDF
Accenture Salesforce Developer Meetup vol 1 2019
PPTX
Comment utiliser Visual Studio Code pour travailler avec une scratch Org
PPT
Salesforce Developer eXperience (SFDX)
PPTX
Créer et gérer une scratch org avec Visual Studio Code
PPTX
NAD19 - Create an org with Salesforce DX without Code
PPT
SFDX - Spring 2019 Update
PDF
Salesforce DX 201 - Advanced Implementation for ISVs
PPTX
FTD19 - Salesforce DX with "Visual Studio code"
PDF
Salesforce DX Quickstart for Developers (Barcelona Meetup)
PPTX
Simplify your code with Salesforce DX and module development
PDF
Chicago Salesforce Saturday - Tools Presentation
PDF
Salesforce DX & Deep Dive demo on force:data commands
PPTX
Salesforce DX with Visual Studio Code
PDF
Dreamforce 2017: Salesforce DX - an Admin's Perspective
PPTX
Salesforce DX Test Data Migration
PPTX
SalesforceDX : SalesforceSaturday
PPTX
Salesforce Apex Hours:- Salesforce DX
Salesforce DX for admin
Salesforce DX for Admin v2
LC 2022 - Second Generation Packaging
Accenture Salesforce Developer Meetup vol 1 2019
Comment utiliser Visual Studio Code pour travailler avec une scratch Org
Salesforce Developer eXperience (SFDX)
Créer et gérer une scratch org avec Visual Studio Code
NAD19 - Create an org with Salesforce DX without Code
SFDX - Spring 2019 Update
Salesforce DX 201 - Advanced Implementation for ISVs
FTD19 - Salesforce DX with "Visual Studio code"
Salesforce DX Quickstart for Developers (Barcelona Meetup)
Simplify your code with Salesforce DX and module development
Chicago Salesforce Saturday - Tools Presentation
Salesforce DX & Deep Dive demo on force:data commands
Salesforce DX with Visual Studio Code
Dreamforce 2017: Salesforce DX - an Admin's Perspective
Salesforce DX Test Data Migration
SalesforceDX : SalesforceSaturday
Salesforce Apex Hours:- Salesforce DX
Ad

More from Bohdan Dovhań (11)

PPTX
PUBLISHING YOUR PACKAGE TO APPEXCHANGE IN 2023
PPT
Migrate To Lightning Web Components from Aura framework to increase performance
PPT
Custom Metadata Records Deployment From Apex Code
PPT
Sdfc forbidden and advanced techniques
PPTX
SFDC REST API
PPTX
Being A Salesforce Jedi
PPT
Salesforce REST API
PPT
Salesforce certifications process
PPT
Salesforce for marketing
PPT
Introduction about development, programs, saas and salesforce
PPT
ExtJS Sencha Touch
PUBLISHING YOUR PACKAGE TO APPEXCHANGE IN 2023
Migrate To Lightning Web Components from Aura framework to increase performance
Custom Metadata Records Deployment From Apex Code
Sdfc forbidden and advanced techniques
SFDC REST API
Being A Salesforce Jedi
Salesforce REST API
Salesforce certifications process
Salesforce for marketing
Introduction about development, programs, saas and salesforce
ExtJS Sencha Touch

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecture types and enterprise applications.pdf
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
STKI Israel Market Study 2025 version august
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
project resource management chapter-09.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Tartificialntelligence_presentation.pptx
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
Web App vs Mobile App What Should You Build First.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Hybrid model detection and classification of lung cancer
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
OMC Textile Division Presentation 2021.pptx
PPTX
The various Industrial Revolutions .pptx
Programs and apps: productivity, graphics, security and other tools
Architecture types and enterprise applications.pdf
O2C Customer Invoices to Receipt V15A.pptx
STKI Israel Market Study 2025 version august
Hindi spoken digit analysis for native and non-native speakers
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
project resource management chapter-09.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Tartificialntelligence_presentation.pptx
DP Operators-handbook-extract for the Mautical Institute
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A comparative study of natural language inference in Swahili using monolingua...
Univ-Connecticut-ChatGPT-Presentaion.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Web App vs Mobile App What Should You Build First.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Hybrid model detection and classification of lung cancer
Developing a website for English-speaking practice to English as a foreign la...
OMC Textile Division Presentation 2021.pptx
The various Industrial Revolutions .pptx

Second-generation managed packages

  • 3. Bohdan Dovhan Salesforce Practice Lead 9x Salesforce Certified Specialist 11 years of Development experience 8 years of Salesforce Development experience
  • 4. Second-generation managed package, created, developed and managed by SFDX CLI Independent Software Vendor The company, who releases the managed package First-generation managed package, also known as Classic package, created and managed from Packaging or Patch Orgs Salesforce Developer Experience (DX) is command line interface which provides tools to manage data and metadata on Salesforce environments Organization feature which provides access to create and manage scratch orgs and create and manage second generation packages Namespace is the prefix used by managed packages to isolate the metadata scope Salesforce acknowledgement of managed package required for publishing on AppExchange Salesforce Marketplace where packages can be found for installation or published by ISV Bundled container of code and metadata which can be published on AppExchange or shared directly to subscribers
  • 5. The authoritative source of truth Namespace Org, the org where namespace is registered Version Control System, such as Git or SVN or Mercurial Packaging Org, the org where the package is created, built and registered Subscriber Org, the org where your subscriber clients install and use your package Patch Org, the org where the patch version of package is developed and built Package snapshot, which is defined by Major, Minor, Patch and Build version Feature, which allows to push upgrades to the subscribers without their consent Scratch Org is the source driven temporary disposable organization
  • 17. @namespaceAccessible public with sharing class JQ { public class InvalidJSONQueryException extends Exception{} @testVisible Map<String, Object> internalRepresentation; @namespaceAccessible public JQ(String data) { internalRepresentation = (Map<String, Object>) JSON.deserializeUntyped(data); } ….
  • 57. sfdx force:package:version:create -d force-app -x -w 60 --skipvalidation –json echo $(sfdx force:package:version:create -d force-app -x -w 60 --codecoverage --json) > createPackageVersion.txt pid=$(cat createPackageVersion.txt | jq '.result.SubscriberPackageVersionId' -r) sfdx force:package:version:promote -n -p $pid
  • 77. To gain practice experience, you may do this workshop on your own Prerequisites: http://bit.ly/3qPLLyy Workshop: http://bit.ly/2KT9G0R
  • 78. References  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_comparison.htm  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp.htm  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_before.htmHealthTech  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_build_release.htm  https://developer.salesforce.com/docs/atlas.en- us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_package.htm#cli_reference_force_package_install  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/push_upgrade_use_api.htm  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_publish_appexchange.htm  https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_dev2gp_known_limitations.htm  https://developer.salesforce.com/docs/metadata-coverage/53  https://salesforce.stackexchange.com/questions/318894/guidelines-on-the-process-of-converting-the-first-generation-manage- package-to-s/318896  https://salesforce.stackexchange.com/questions/225064/how-do-i-create-a-managed-package-with-sfdx  https://salesforce.stackexchange.com/questions/236881/how-do-you-create-a-package-version-with-dependencies-on-both-2gp- and-1st-gen-ma