Sunteți pe pagina 1din 24

Salesforce Packaging Demystified

Diamond Sponsor

Platinum
Sponsors

Gold
Sponsors

Silver
Sponsors
www.virtualdreamin.com 2
COVID-19 Resilience Fund

Non-Profit Charity Partners

www.virtualdreamin.com
Speaker

Mohith Shrivastava @msrivastav13

Lead Developer /mohith-shrivasta


Evangelist,Salesforce va-9a36464a/

4/9/20 www.virtualdreamin.com 4
Safe Harbor Statements
Statement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if
any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the
forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of
product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of
management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and
customer contracts or use of our services.

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our
service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth,
interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any
possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and
motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling
non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the
financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form
10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the
Investor Information section of our Web site.

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not
be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available.
Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
Agenda
❖ Salesforce Metadata Overview

❖ Dependency between Metadata

❖ Salesforce application package

❖ Unmanaged Packages and Managed Packages

❖ Unlocked packages

❖ 2nd Generation packages

4/9/20 www.virtualdreamin.com 6
1
Co
nfi
gu
Th at r
va is io
w lid inc n
o a
re rk t lu
pe po flo ion des
on rm rts ws rul cr
. is , fo , p es ea
si ld ag , p ti
on e e ro ng
se rs, lay ce ob
ts tab ou ss je
, fl s t, b ct
ow , a lig uil s,
s, pps ht der fiel
an , p nin , ds
d ro g ,
th fi pa
e les g
lis , es
2 tg ,
oe
s
Co
de
a
ap pex
ex , v
co isu
m alf
po or
ne ce
nt pa
s, ge
lw s
c, , a
ap ura
ex c
tri om
gg p
er on
s en
ts
,
3

Se
tti
ng
Salesforce Metadata Overview

Ad s
c d an
on onfi res d
gu s s Fe
ra et at
tio tin ur
n, gs es
Li , A
ve c
Ag cou
en nt
ts Se
an tt
d ing
lis s,
tg B
oe ot
s
Salesforce Metadata Overview
• Metadata for each component type is an XML file.

• Moving metadata from one to org is feasible through


Salesforce Metadata API.

• You need a package.xml file and Metadata to move


components from one org to another.

• Find different Metadata types in Metadata Coverage Report.


Dependency Between Metadata

Custom Object

Field A Field B

Page Layout x Validation Rule X Apex Class XY LWC XY


Dependency Between Metadata
• Dependency API (BETA) allows to discovering the relationship
between metadata

• “Where this used” button on custom fields shows dependent


components.

• Unmanaged packages magically tracks and pulls all dependent


components. We will explore this later via a demo.
Salesforce Package
• The Package is a container that consists of multiple related components.

• For the package to deploy to other orgs it must compile and validate.

• If you miss a dependency while trying to move components to another


Salesforce environment, you get errors.

• Metadata or Settings can depend on Feature License. If feature license is


missing in destination org where you are deploying metadata, your
deployment can fail.
Demo Metadata
Unmanaged and Managed Packages
Unmanaged Managed
Not Upgradable Upgradable and versionable. Has a Namespace

No IP Protection IP Protected

Generally suitable for open source projects or provide a Can be distributed via Appexchange
template code.

Can be edited in subscriber org Certain Attributes can be locked and non-subscriber
editable. Supports push upgrades and patches.
Unlocked Packages

Suitable for business apps not meant for distribution. Upgradable.


Can have Namespace and encourages source driven development

You can break your app into multiple modules. For orgs that
have a lot of dependencies, make your next package depend
on org itself.

Scratch orgs, Salesforce CLI and Salesforce Extension


pack for VSCode
Tools Required For 2G Unlocked packages
● Requires My Domain
● Enable Devhub for your org to allow package
creation
● Scratch org generation

● Command line tool makes working with Salesforce


org easier
● Provides commands for Data upload, scratch org
creation, and package generation
● You can configure shapes and feature

● VSCode plugin for editing and saving code


● Local Development for Lightning Web Components
● IDE functionality like Code Completion, Syntax
Highlighting. apex debugger
Demo Unlocked Package
creation Steps
Unlocked Package Types

Org Independent Org Dependent(Preview/BETA)

Suitable if you can untangle Massive org and untangling


dependencies your org dependency is not an option

Have to support Multiple orgs and Not a Multi org and you have
have the common business process everything in one org
and need common functionality
Difference Between 1GP and 2GP
1GP 2GP
Packaging org is source of truth. Your source code in version control is the source of
truth.

Developers could not get the same namespace as that of Developers can create scratch orgs with the same
packaging environment. namespace as packaging environment

Packaging org can have only one package Devhub can have more than one package and with
same namespace
Difference Between 1GP and 2GP
1GP 2GP
The Packaging version is linear Packaging version can be branched

One needs patch org to create patches Patches created using Salesforce CLI without
needing patch orgs

Package creation cannot be automated One can automate package creation using CLI

Global apex is the only way to share your code packages in the same namespace can share public
classes using annotation @namespaceAccessible
2GP Package Creation Steps

1 2 (OPTIONAL) 3 4

Register and Link Create and Install


Create Scratch orgs
Enable Dev Hub Namespace packages

Production Environment if If you are an ISV/want to Enable Features and Create and Install
you have salesforce use namespace register Settings in orgs as per Packages via CLI
environment, Partner the namespace and link to your app requirement
Business Org if you are an the DevHub.
ISV
Metadata API Guide

ISVforce Guide

Trailhead Quick Start: References


Unlocked Packages

Salesforce DX Developer
Guide
Play Treasure Hunt
Chance to win IPad, Airpods, Certification Vouchers and many
more prizes.
Navigate to - https://vd.force.com & enter below code

43X85C
P.S: Code would be valid only for 5-60 Minutes
Thank You
Welcome to VirtualDreamin
2020

S-ar putea să vă placă și