Questions tagged [2gp]

Questions about second-generation packaging (2GP). Includes the partner-centric feature of Managed 2GP as well as the customer-centric feature of Unlocked Packages.

Filter by
Sorted by
Tagged with
3
votes
1answer
40 views

How do we handle additions to page layouts with SalesforceDX / 2GP?

I've found some time to return to an older project of mine, moving my org away from the org development model to the package development model to make better use of SFDX and CI/CD. The issue I'm ...
2
votes
0answers
15 views

Is there a scripted/coded/API way to remove a metadata item from an Unlocked Package?

When an Unlocked Package is installed into a subscriber org, the metadata from the package is tagged as belonging to the package. In that subscriber org, we can go to the package details through the ...
0
votes
1answer
25 views

Include two different package Directories during unlocked package creation

I am having different set of LWC components some under force-app and some under common folder. My sxdf-project.json is { "packageDirectories": [{ "path": "...
0
votes
1answer
22 views

Load data into object after Unlocked package

I want to load some data into an object after a package gets installed. I tried using a post-install script but seems these only work for Second-Generation Managed packages and not for Unlocked ...
3
votes
1answer
37 views

When referencing a 1GP connected app from a 2GP package, what happens when the certificate associated with the connected app is updated?

Given this detail about referencing an explicit version of a connected app from a 1GP managed package to include it in a 2GP package, what are the implications of updating an expiring certificate for ...
2
votes
0answers
24 views

Page layout assignments in 2GP

We are working on 2GP for one of our applications. We are facing one issue that page layout assignment is not happening after the installation of 2GP. Our package contains everything including the ...
1
vote
1answer
25 views

Enabling Unlocked Packages and 2GP on a HUB

So basically my company has a dev hub, that owns all our 1GP enterprise managed/unmanaged packages. What will happen to 1GP packages if we turn on "Enable Unlocked Packages and Second-Generation ...
2
votes
1answer
59 views

This app can't be upgraded: Invalid Upgrade: The currently installed version does not share a common ancestor with this version

I am trying to upgrade from v0.6 to v0.7 of a Managed Package which uses 2GP. I am getting this error message: This app can't be upgraded. There are problems that prevent this package from being ...
0
votes
1answer
28 views

Clarifications on salesforce 2g packages [closed]

I am working on 2g package generation and these are few questions troubling me : Is it mandatory to keep metadata in namespace org to create 2g package version. What if namespace org is empty and all ...
3
votes
0answers
38 views

Package a custom field on LiveChatTranscript object using 2gp

We are creating an AppExchange application where we need to package a custom field on the LiveChatTranscript object. While creating a 2GP package, we are getting an error: LiveChatTranscript....
1
vote
1answer
64 views

ERROR: Removing metadata components from a second-generation managed package is a pilot feature that requires acceptance into a pilot program

I am trying to create a new package version using 2GP. When I run this command sfdx force:package:version:create ... I am getting this error: ERROR running force:package:version:create: Can’t ...
3
votes
1answer
57 views

2GP Create Package Version Fails when running tests

I've recently added some Field Level Security checks into the Apex code of a 2GP managed package. But when I run: sfdx force:package:version:create ... A lot of the tests fail, saying the fields are ...
0
votes
1answer
20 views

Can we package Layout assignment for Record Types and Record Type page assignment via PS?

Is there any place we can refer, which metadata can be added to a 2G managed package. For example, I need to know whether we can package the following option in a 2G managed package, Layout assignment ...
1
vote
0answers
21 views

SFDX packaging - Report folder sharing settings

I am running into an issue while trying to install an unmanaged package / deploying metadata through SFDX. On the ORG I am working on we have Report Folders which should be initially shared with some ...
0
votes
1answer
39 views

Trying to Package Connected Apps in Second-Generation Managed Packaging

I am fairly new to Salesforce, and currently trying to explore Connected App in 2GP. I have done some reading and came across some posts that is similar to my situation here. Package Connected App ...
1
vote
1answer
134 views

ERROR running force:org:create: We don’t recognize this namespace: x. Did you register it in your Dev Hub org?

I am trying to create a Scratch Org with a Namespace using command: sfdx force:org:create -s -f config/project-scratch-def.json -a my-namespace -d 30 But I get this error: ERROR running force:org:...
3
votes
2answers
150 views

2GP Extension Package With Dependencies on External Packages

I need to create an AppExchange Package (extension to Health Cloud), which has dependencies on the Health Cloud package. As per documentation/community, 2GP is the recommended way to package new ...
2
votes
1answer
64 views

Pull Upgrade failed: Major version number is null or out of range (>= 1)

I am struggling to create a new Managed Package version which will successfully install over the existing installed version. Currently Installed MyApp@0.1.0-26 The sfdx-project.json config "...
0
votes
1answer
73 views

How to include Record Page and Page Layout assignment into a 2GP Managed Package?

I have a Managed Package which contains both Record Page and Page Layout. But once installed, neither are assign to corresponding App and Record Type Is it possible to include these assignments into a ...
4
votes
1answer
53 views

Can a 2GP package include a post install page?

The sfdx-package.json allows specification of the postInstallUrl, documented as: None. A URL to post-install instructions for subscribers. First generation managed packages support a post ...
6
votes
2answers
111 views

How update Managed Packages (2GP) if one of the Apex classes is scheduled Apex

I often run into this error message: This schedulable class has jobs pending or in progress You can bypass this error by allowing deployments with Apex jobs in the Deployment Settings page in Setup. ...
0
votes
1answer
51 views

Is there any way we can include the source of a managed package inside a customer specific managed package?

I am really new to the packaging process for creating managed package and looking for a help from the experts, We do have a use-case where we need to include the source of a managed package inside a ...
4
votes
1answer
68 views

2GP: Package upgrade from patch to next minor version

I have a package version 1.2.0.0 and I've created a patch with some hotfixes which I packaged as 1.2.1.0 (updated the patch version). During packaging of 1.2.1.0 the ancestor version specified is ...
2
votes
1answer
103 views

Can I delete a Platform Event from a Released 2GP Managed Package?

I am trying to confirm if I can delete a Platform Event after I've released it in a managed package. There is documentation which should outline this: Package and Distribute Your Apps: Components ...
0
votes
0answers
26 views

How to add EmailFolder to 2GP Managed Package (same problem with ReportFolder)

Can someone clarify how exactly to do this? I don't see "email folder" as an option to download from the org in Vs Code. I only see "email template" (see screenshot), then when I ...
1
vote
1answer
37 views

2GP Package Creation - Email Template include error

i have created a 2gp package which contains email template from public classic email template folder. But while installing package it throws error as below
1
vote
0answers
75 views

2GP: Filtered report charts in Lightning Record Pages can't be packaged and working

In a 2nd generation managed Package, I want to include Filtered report charts in Lightning Record Pages, but I either can't package them because the filter is namespaced, or the filter is broken in ...
0
votes
2answers
101 views

Create 2GP package version with multiple dependency

I have below JSON file having more than one package dependency link to single package. When a package has single dependency it executed without error but if a package has two dependency I am getting ...
3
votes
1answer
87 views

FLS check in 2GP

I've created a new 2GP package. Since it is going to be released to AppExchange, I've implemented a generic CRUD and FLS check for every place I contact with the Database in my Apex code. e.g. ...
1
vote
1answer
35 views

Unlink Namespace Dev Hub

Obviously you can link a namespace to a Dev Hub, but is it possible to unlink a namespace from a Dev Hub and link it to a new one?
0
votes
1answer
23 views

Link Namespace window throwing an error

When I click the "Link Namespace" button, it pops up a new window and then give this error: Is the only way to resolve by contacting support?
0
votes
1answer
67 views

2GP managed package: cannot create a patch release

We have an "extension" package that integrates our managed 1GP with a third party managed 1GP. This "extension" package is realized as a managed 2GP. We hit a problem when trying ...
4
votes
1answer
267 views

Difference between Unlocked vs Second Generation Managed Package

Bear with me, I'm not sure I fully understand what's given in the documentation. I understand the difference between 1GP vs 2GP. From what I read Unlocked Packages are different than Second-Generation ...
2
votes
2answers
92 views

Second Generation Packages - Mismatching Versions

Is it possible to avoid mismatching version during Salesforce transition periods? Salesforce message Mismatching Versions. The AppExchange Application or component you have selected is not yet ...
2
votes
1answer
186 views

Second gen package error about a component being a scratch org ancestor? What does this mean?

My sfdx-project.json looks like this: { "packageDirectories": [ { "path": "force-app", "package": "my package", ...
2
votes
1answer
239 views

SFDX 2GP: cannot create new managed package version

I need to add a new class to an existing 2GP managed package. I get the following error when I attempt to create the package using the SF CLI. How do I resolve this issue when I attempt to build it? ...
4
votes
0answers
90 views

Managed 2GP Package CI/CD

We're looking to adopt a CI/CD flow similar to this Salesforce diagram. The CI part is pretty much there but with 2GP all packages are created as beta packages which can't be upgraded in our Test/UAT ...
5
votes
1answer
130 views

Solving error about NavigationLinkSet when packaging a community using 2GP

In a Community that I am trying to package using 2GP with: sfdx force:package:version:create after eliminating several errors I am now getting this one: These entities are not supported: [...
3
votes
1answer
171 views

How to use second generation packaging (2GP) for a community?

We've been running Jenkins builds for a while containing: sfdx force:package:version:create --skipvalidation ... with no problem, but now we are preparing to promote to a release, removing the --...
3
votes
1answer
42 views

Problem with object layouts and custom global actions in package (2GP)

So I'm trying to install a new 2GP package that has an object with a custom global action as part of it's page layout. I'm running into problems and I'm wondering whether I've missed something or if ...
3
votes
1answer
69 views

Enforce default version order in Managed 2GP

One great feature of Managed Second-Generation Packages (M2GP) is dynamic and flexible versioning. In First-Generation packages we had a strict linear version where each uploaded version dependent on ...
4
votes
2answers
389 views

How to speed up scratch org creation when it includes installed packages

We are just setting out on our journey with 2GP. Our first 2GP is a new "extension package" that integrates our core product (an existing 1GP) with a third-party product (another existing 1GP). As ...
2
votes
1answer
60 views

Can a 2GP managed package depend on a BETA release 1GP managed package?

We are creating a new "extension package" for our AppExchange 1GP that integrates it with a third-party managed package and want to use 2GP for this "extension package". The third-party is willing to ...
4
votes
2answers
300 views

Change version number scheme in sfdx-project.json

For the sake of simplicity, I want to change the default version number scheme of SFDX projects from Major.Minor.Patch.Build to Major.Minor like "versionNumber": "0.1.0.NEXT" to something like "...
3
votes
2answers
396 views

'ParentId' field missing when deploying ExperienceBundle - 2GP

We are attempting to deploy a community (ExperienceBundle) through an Unlocked Second-Generation Package. The package will create fine but once we install it in an org, we get the following error ...
0
votes
0answers
114 views

Unable to deploy unlocked packages created with SFDX/CLI

I am unable to deploy unlocked packages created with SFDX/CLI . I am receiving the "The package version is not fully available. If this is a recently created package version, try again in a few ...
7
votes
1answer
1k views

Converting First Generation Managed Package to Second Generation (2GP) Packages

In light of the new Winter '20 release and that 2GP will be Generally Available, it means we'll be able to develop and release managed packages on the AppExchange through the new 2GP processes. In ...