Understanding Packages (3% Weighting) Flashcards
Given a scenario, analyze and explain the use cases and considerations when using managed vs unmanaged packages
When using the package development model, which metadata changes do you need to track manually?
A) Changes to components not yet supported by source tracking
B) Only the changes made via the Setup UI
C) All metadata changes for the release
D) None. All the changes are tracked automatically
A) Changes to components not yet supported by source tracking
What is the key benefit of a scratch org?
A) It never expires
B) You can share its definition file with others
C) It’s an exact copy of your production org
D) Your source is automatically pushed to your VCS
B) You can share its definition file with others
What is the source of truth for package development?
A) Sandbox
B) Version control system
C) Production org
D) Salesforce DX project
B) Version control system
What are the advantages of package development?
A) Ability to build development orgs directly from source
B) All code and customizations are intermingled in the source repo
C) Agile release models allow more frequent, independent releases
D) A and B
E) A and C
E) A and C
How does Salesforce DX define a package?
A) All the code in your production org
B) The metadata in your sandbox
C) A group of code and customizations you want to release together
D) The set of all changes that you want to deploy in a monthly release
C) A group of code and customizations you want to release together
What use cases are ideal for shifting to a modular package-based approach?
A) You’re developing a distinct application
B) Your production org isn’t complex and you make minimal changes month over month
C) You want multiple development teams to work independently and deploy changes on their own release cycles
D) Your sales automation customizations can’t be tested independently of the rest of the org data
E) A and C
E) A and C
In what scenario do you need to be careful when creating projects?
A) When a project is a distinct application
B) When your team is ready to build and deliver in a separate release cycle
C) When your team works on multiple projects
D) When projects share metadata components
D) When projects share metadata components
Who are unlocked packages primarily designed for?
A) Salesforce partners who want to publish on AppExchange
B) Customers who develop and deploy in-house business apps
C) Development teams who want to distribute Lightning components on App Exchange
D) A and C
B) Customers who develop and deploy in-house business apps
What is the Package Development model?
A) Using change sets to deploy updated metadata to the production org
B) Promoting the org as the source of truth
C) An iterative process where you organize your metadata into packages
D) A process that requires you to track all your metadata changes in a spreadsheet
C) An iterative process where you organize your metadata into packages
How do you deploy metadata in this new model to sandboxes for user acceptance testing?
A) Run force:source:push from the Salesforce CLI
B) Use the ANT Migration Tool to deploy the metadata
C) Install the package version in the org
D) Use change sets to move the metadata between orgs
E) B and D
C) Install the package version in the org
Which of the following about unlocked packages is true?
A) They have a strict set of manageability rules
B) They can be installed in only scratch orgs and sandboxes
C) They provide flexibility to make changes directly in the org
D) They don’t support dependencies between packages
C) They provide flexibility to make changes directly in the org
Use Dev Hub to:
A) Manage sandbox and production orgs through the command line
B) Create and manage your scratch orgs
C) Move configurations from your sandbox to your scratch org
D) Create a scratch org for another team member
B) Create and manage your scratch orgs
How do you list all available CLI commands
A) sfdx force:commands:view
B) sfdx force:list:help
C) sfdx force:doc:commands:list
D) sfdx force:doc:commands:view
E) sfdx force:commands:doc:display
C) sfdx force:doc:commands:list
What’s the CLI command to create a new Apex class called NewClass in the force-app folder?
A) sfdx force:apex:class:create -n NewClass -d force-app/main/apex/classes
B) sfdx force:apex:class:create -n NewClass -d force-app/main/default/classes
C) sfdx force:apex:class:create -n NewClass -f force-app/main/default/apex
D) sfdx force:apex:class:create -n NewClass -f force-app/main/default/classes
B) sfdx force:apex:class:create -n NewClass -d force-app/main/default/classes
What’s the CLI command to create a new Aura component called ListView in the force-app folder?
A) sfdx force:lightning:component:create -n ListView -f force-app/main/default/aura
B) sfdx force:lightning:component:create -n ListView -d force-app/main/aura
C) sfdx force:lightning:component:create -n ListView -f force-app/main/default/lightning
D) sfdx force:lightning:component:create -n ListView -d force-app/main/default/aura
D) sfdx force:lightning:component:create -n ListView -d force-app/main/default/aura
What’s the CLI command to synchronize changes in your local project to a scratch org with the alias MyScratchOrg?
A) sfdx force:org:push -a MyScratchOrg
B) sfdx force:source:push -a MyScratchOrg
C) sfdx force:source:push -u MyScratchOrg
D) sfdx force:source:sync -u MyScratchOrg
C) sfdx force:source:push -u MyScratchOrg
What’s the CLI command to assign a permission set called MyPermSet to provide access to objects in an org with the alias MyTP?
A) sfdx force:permset:assign -n MyPermSet
B) sfdx force:user:permset:assign -n MyPermSet -u MyTP
C) sfdx force:org:permset:assign -n MyPermSet -a MyTP
D) sfdx force:user:permset:assign -n MyPermSet -a MyTP
B) sfdx force:user:permset:assign -n MyPermSet -u MyTP
What are some benefits on Package Development? (8 answers will be provided ;)
- Follows best practices regarding the software development life cycle
- Encapsulates all the changes you are tracking between life cycle stages
- Makes it easier to accommodate new feature requests
- Provides an improved audit history
- Organizes source
- Promotes iterative and modular development
- Supports inter dependencies among unlocked packages
- Supports continuous integration and continuous delivery because the packaging CLI commands enable each step in the deployment pipeline to be fully automated
If you are migrating metadata from your org to an unlocked package, should you create your unlocked packages with or without a namespace (and why)?
WITHOUT a namespace. That way, when the metadata is moved from an unpackaged state to an unlocked package, the API name of the metadata elements doesn’t change
When would you use the App-Based model to untangle your metadata into packages?
App-Based is used to identify metadata that represents an app. This approach is similar to creating a package for the “DreamHouse” app with the exception that the metadata already exists in your org
When would you use the Customizations-based model to untangle your metadata into packages?
Organize unpackaged metadata for customizations and functionality changes in your product org, such as customizations to Sales Cloud, Service Cloud, or an AppExchange App
When would you us the Shared Library model to untangle your metadata into packages?
When interdependencies exist, use a common Salesforce DX package to organize a set of Apex classes or commonly used custom objects. Other packages that you construct can depend on this common package.
What are the steps to create an unmanaged package (as a starting point to move to package development) (6 steps are provided)?
- Select a small set of unpackaged, self-contained metadata from your prod org
- Create an unmanaged package to isolate the metadata you’ve identified
- Retrieve the source from your unmanaged package using force:mdapi:retrieve
- Set up a Salesforce DX project and a git repository to mange the package metadata.
- Convert the source to Salesforce DX format by running force:mdapi:convert
- Push the metadata to a scratch org using force:source:push
- Create an unlocked package using the –nonamespace flag
- Test and deploy the unlocked package
- Once the unlocked package has passed all CI runs and UAT on sandboxes, promote the package version
- Install the unlocked package in the production org.
What should you do when you’re starting to organize your metadata into packages?
A) Put all your metadata into one unlocked package
B) Identify a set of related metadata that represents a functional unit
C) Convert your source to Salesforce DX format using force:source:convert
D) Create a package with a namespace to make sure API names don’t change
E) B and C
B) Identify a set of related metadata that represents a functional unit