Questions tagged [unlocked-package]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
18
votes
2answers
335 views

Can we move metadata between Unlocked Packages?

We're starting to figure out Unlocked Packages in Salesforce DX, and finally have a working base version. However, we do plan on breaking out fields, classes, etc to dependent packages as we continue ...
16
votes
1answer
367 views

Why can't I deploy my Unlocked Package back in to my own Sandbox org?

The Background We are a super-sized Performance Edition organization with a number of enhanced limits, and migrating our "happy soup" to DX Unlocked packages. We previously had problems creating ...
12
votes
2answers
121 views

Upgrading multiple packages at once

I see a lot of people pushing a code base of "Happy Soup" of packages. However, there is a common dependency management use-case that I haven't seen a solution for. Deployments that requirement ...
10
votes
1answer
558 views

SFDX: Create unlocked package version - What is happening behind the scene?

When we are creating unlocked package version in 2GP, we don't need to have packaging org at all to deploy code there, upload package etc. (as it was with first generation packaging). So we just ...
9
votes
1answer
224 views

Can Unlocked Packages only modularize a single project / repo / org?

The longer I read and watch everything related to Org modularization using Salesforce DX Unlocked packages there more I get the feeling that this is only about local dependencies meaning: You take ...
9
votes
0answers
213 views

Upgrade of Unlocked Package changed RecordTypeId of existing records

I have an Unlocked SFDX Package with a CustomObject__c and two Record Types RTypeA and RTypeB. The object and the two types have existed in the package before my update. Before the upgrade all ...
7
votes
1answer
115 views

Flow from Unlocked DX package can not be changed in subscriber org. Why?

I just installed an unlocked package containing flows in a customer sandbox and was a bit shocked to see that the flow cannot be opened and adjusted by the customer/subscriber. I thought that's the ...
6
votes
1answer
248 views

Can/should DX Unlocked packages be used for app distribution to customers

Unlocked Packages are just the perfect compromise for everybody working with Salesforce code that he is delivering (for money) to a customer (or two). Managed packages are too much overhead (become a ...
6
votes
1answer
53 views

Nested Unlocked Packages requires Installation of Base Packages?

We're trying to create a nested package structure to keep our code organized. So far, we have a design that looks like this: core ^-- utils | ^---- marketing | ^---- support | ^---...
6
votes
1answer
173 views

Unlocked Package Dependencies

Given two unlocked packages: UP_A and UP_B. UP_B classes uses classes from UP_A (UP_B depends on UP_A). When I try to create a new version to UP_B from terminal I get the message: ClassFromUP_B: ...
6
votes
2answers
116 views

How to create unlocked package version with dependency to managed package?

I'm trying to create a package version to an unlocked package I've created and keep getting error messages. The first problem I've encountered was a long error message about invalid type and ...
6
votes
1answer
59 views

Cannot migrate deprecated unlocked package2 component since Winter 20'

I am unable to migrate a package2 member from one unlocked package to another. Before Winter 20', as per these instructions, deprecating a member from the first package and installing the second ...
5
votes
2answers
367 views

How do I view a list of packages installed in a DevHub org using the SFDX CLI?

When I run: sfdx force:package:installed:list -u DevHub (where DevHub is the alias of my production org, which IS enabled as Dev Hub and also has 2GP enabled) I receive this error: ERROR ...
5
votes
0answers
59 views

Can we download the contents of an Unlocked Package?

I had created a number of packages and package versions in order to help prepare for moving our metadata to packages in production. At some point, I accidentally pulled in a bunch of metadata that I ...
4
votes
2answers
52 views

Upgrade unlocked package fails due to “Cannot use unfiled-public or user folders in a package”

I'm trying to install the unlocked package to a sandbox org, where a previous version of it already exists. I used to have an email template in unfiled public, but I moved it to a public read/write ...
4
votes
1answer
40 views

How to use public sites with SFDX and Unlocked Packages

I have some code which integrates with a third party service by exposing webhooks (REST Methods) via a public (non-authenticated) site. I'm trying to figure out how this should work as part of ...
4
votes
1answer
64 views

DX standard pick-list values in unlocked package

We have certain parts of our org metadata that we can't put in an unlocked package because they are dependent on standard pick-list values (i.e. opportunity stage). Is there a way to put standard ...
4
votes
1answer
309 views

User can create DX Unlocked package but not a version

When creating a DX Unlocked Package version from a DevHub org and user with Second Generation Packages Enabled (1h ago) sfdx force:package:version:create -p "myapp" -x -json I get the following ...
4
votes
0answers
110 views

Could Unlocked Package installation delete or update Record Types of existing records?

I have an object A with record type a1 and a2. I made an unlocked package and installed it to production org. After a few days, the client comes with some other changes and I made another version of ...
4
votes
1answer
147 views

Unlocked Package Dependency Missing Organization Feature Knowledge

Error when creating new version of unlocked package. An error occurred while trying to install a package dependency,ID 04XXX: Missing Organization Feature: Knowledge sfdx-project-json "...
3
votes
2answers
102 views

Lead recordtypes (BusinessProcess) in unlocked packages Winter'20

ApiV47 (Winter'20) does not support BusinessProcess metadata anymore. In order to have RecordTypes on Lead you need to have BusinessProcess. So we do have a few. So far we deployed the code using ...
3
votes
1answer
277 views

Create Package Version Error: Entity Quote not found

I'm trying to create a new unlocked package that adds some custom fields to the Quote object. If I deploy the source to a scratch org everything works as expected. I created the package running: ...
3
votes
1answer
42 views

Enable Multiple Languages via knowledgeSettings in Scratch Org Definition File

I'm creating a scratch org definition file (project-scratch-def.json) in order to create an Unlocked Package that will interact with Salesforce Knowledge. I'm currently stuck when I try to add a ...
3
votes
1answer
78 views

Installing Unlocked Package in Production fails with conflicts

I have an unlocked package with custom object Person__c and field Account__c as a lookup on the account. I tried installing this package in an org where Person__c object is already available with ...
3
votes
1answer
99 views

Unable to parse package2-descriptor.json: invalid attribute 'orgPreferences'

Suddenly, the following error message pops up when trying to build a new package using sfdx force:package:version:create. Unable to parse package2-descriptor.json: invalid attribute 'orgPreferences' ...
3
votes
1answer
110 views

Unlocked package as an extension to classic package with the same namespace

We have our huge managed package (1st generation) with extremely large number of components in it. Package upload and test executions takes up to 3 hours as of now. And we need to continue adding more ...
2
votes
1answer
404 views

Cannot add component to another package because it is an installed component

I have two unlocked packages. One package defines a number of custom fields on the Opportunity object and the other defines page layouts and other configurations the Opportunity. I receive the ...
2
votes
1answer
191 views

Error running sfdx force:package:version:create

I get an error when I'm trying to create a package version. This is the command which I'm running: sfdx force:package:version:create -p assured-pkg4 -d force-app -k 12345 --wait 10 -v DevHub And ...
2
votes
1answer
36 views

Salesforce CLI not respecting versions in package dependencies

We've got App2 package which depends on App1@0.1.0.LATEST. However, CLI doesn't seem to respect versions in package dependencies. For instance, it's NOT preventing App1@2.0.0.NEXT package version from ...
2
votes
0answers
21 views

How do I use an open source GitHub repo in an unlocked package?

I have recently started exploring unlocked packages. I want to use features from https://github.com/apex-enterprise-patterns/fflib-apex-common in my packages. I could clone the repo and convert it ...
2
votes
1answer
36 views

SFDX: Package dependency on unpackaged stuff

Is there a way to make a package dependent on unpackaged stuff (not another package)? without having to turn that stuff itself into unlocked package. without including its metadata in package. The ...
2
votes
0answers
34 views

Permission set error while installing unlocked package

I have created an unlocked package version and while trying to install it in production, I am getting an error: Permission Create Invoice_Approver__c depends on permission(s): Read Order__c ...
2
votes
0answers
88 views

Include HEDA/EDA as dependency for package using SFDX

I am trying to include HEDA as a dependency for a package that I am trying to create, but when I attempt to create a package version, I get the following error: ERROR running force:package:version:...
1
vote
1answer
34 views

SFDX - Can't Create Unlocked Package Version With BillingCountryCode/BillingStateCode

I am getting an error when trying to create a version of my unlocked package after adding Apex code that references the Account.BillingCountryCode and Account.BillingStateCode fields. Everything is ...
1
vote
1answer
146 views

sfdx force:package:version:create The provided package ID '0Hoxxxxx' is invalid

I've just recently started getting an error: The provided package ID '0Ho1C0000004C9wSAE' is invalid. when trying to run sfdx force:package:version:create. This was previously working exactly as ...
1
vote
1answer
23 views

Unlocked Packages - Install using URL

Is it possible to distribute an unlocked package using an installation URL? Intent is to install the package into a different production org. (assuming the organization has multiple orgs)
1
vote
1answer
146 views

SFDX: Entities not supported on package version creation

I'm trying to create a new package version for my SFDX project. As usual, I'm executing the following command: sfdx force:package:version:create --package MyPackage --installationkey abcdefg123456 --...
1
vote
1answer
61 views

Purpose of VERSIONNAME in sfdx force:package:version:create

In the SFDX CLI Docs, the commands force:package:version:create takes both a VERSIONNUMBER & VERSIONNAME. The description for VERSIONNAME is: -a | --versionname VERSIONNAME Optional The name ...
1
vote
1answer
51 views

Converting unlocked package to managed package [closed]

Is it possible to convert an unlocked package to a managed package? If so, how?
1
vote
1answer
26 views

Include sharing settings in an unlocked package?

Is it possible to include a sharing setting change in an unlocked package? Essentially the change is to make an object Public Read/Write for External users, whereas now it is Private.
1
vote
0answers
23 views

Trying to resolve errors when creating package version

I'm currently getting the following errors when I'm creating a package version: (1) Case.RMA: Picklist value: Chat in picklist: Origin not found (2) Case.Case: Picklist value: Chat in picklist: ...
1
vote
0answers
23 views

Unlocked Package Custom Metadata SubscriberControlled not working

I have an unlocked package that uses custom metadata to store settings (Shipment_Setting__mdt). XML of the Shipment_Setting__mdt <?xml version="1.0" encoding="UTF-8"?> <CustomObject xmlns="...
1
vote
0answers
23 views

Unlocked packages: Lightning Aura Component Inheritance issue

I have two namespaced unlocked packages, an aura component from one package extends a component from another one. There is a component within the base component with aura:id="cmpId" (It's a global ...
1
vote
0answers
29 views

DX Package existing record types

I am moving existing metadata from an org into unlocked packages.I have ran into a problem when it comes to record types. Problem 1 Because each record type needs to know which pick-list values it ...
1
vote
1answer
16 views

CampaignMember fields and unlocked packages

I can't for the life of me figure out whether CampaignMember fields and the object are supported in 2nd Gen packages. There's nothing in the Metadata Coverage Report on this object and I can't see ...
1
vote
0answers
79 views

Unlocked Packages NO-namespace LWC not being retrieved. Apex visible

I'm looking to inspect the LWC components in a public unlocked package with no namespace prefix but can't seem to retrieve them. Apex code is wide open so I was confused as to why lightning components ...
1
vote
0answers
48 views

Password lost from named credential in unlocked package

I have created an unlocked package. The unlocked package contains named credential. The unlock package process creation when failed when there was no in the file. So, I had to add actualPassword in ...
1
vote
0answers
32 views

Using Protected Component for “Secret Protection” with Unlocked Packages

How do "Protected Components" (Custom Settings or Custom Metadata) function when installed from an Unlocked Package. I was hoping that I would be able to use as "Protected (Managed)" to store "...
0
votes
1answer
36 views

force:package:install --apexcompile package — what are the pros/cons of using it

what are the pros/cons of using force:package:install --apexcompile package? Will the package installations be prone to errors? will it have a negative effect to the destination orgs? Can't find much ...
0
votes
1answer
179 views

Ability to enable Dev Hub / Unlocked Packages for Partner Developer Edition Org

I'm using a Partner Developer Edition org to develop features for a managed package (which resides in a different org). According to the Winter '19 Release Notes, Developer orgs should have the Dev ...