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
1
vote
1answer
25 views

2gp: Should components names be unique across all the packages of the same namespace?

Let's say that we have couple 2gp managed packages all sharing the same namespace. Should all components/classes/pages etc. have unique name across all the packages of the same namespace? Are there ...
2
votes
1answer
38 views

2GP Workflow and Upgrade Questions

I am having difficulty understanding the 2GP workflow. I have read through the documentation and have watched a number of videos but it is still not clicking for me. I was hoping to have someone point ...
0
votes
0answers
11 views

Experiences Security warning with custom components

I am getting a security warning in Digital Experiences after packaging my custom components. I am not calling any third party scripts from my components. I tried reducing the Site's CSP settings but ...
0
votes
0answers
25 views

Second Generation Packages: ERROR running force:package:version:create: : The object 'Object' of type Settings metadata does not exist

I am getting this error when I create version of a new second generation managed package. The project has simple Apex class without code and dependency on single 1st generation managed package. Are ...
0
votes
1answer
24 views

2GP packaging error: These entities are not supported: [NavigationLinkSet]

I am creating a new package for communities. I have included the communityTemplateDefination/lightning bolt/theme defintion and my NavigationMenu (in the navigation menu folder) but when I package it ...
1
vote
1answer
29 views

2GP package dependency version

When configuring sfdx-project.json for 2GP managed package you specify it's dependencies. My package depends on our 1GP managed package. So I specified 1GP package version Id in depencensies. But what ...
2
votes
2answers
41 views

Trouble creating a version for 2GP

Following is my sfdx-project.json : { "packageDirectories": [ { "path": "force-app", "default": true }, { "path": &...
1
vote
0answers
48 views

Unable to package Flow with scheduled path

We are trying to add a Flow to a 2GP Managed Package the Flow has a scheduled action. When we run the command: sfdx force:package:version:create .... We get an error message: ERROR running force:...
2
votes
1answer
28 views

Can objects such as PackagePushRequest be made available in a scratch org?

The question relates to some new API 51 objects that allow second generation packaging push upgrades to be scheduled. Running this script in our Partner Business Org (PBO): List<String> names = ...
4
votes
2answers
64 views

Push upgrade app for second generation packages?

Based on the Scheduling Push Upgrades and the Push a Package Upgrade documentation, while Salesforce UI to schedule push upgrades is available for first generation packages (1GP), for second ...
3
votes
1answer
105 views

How do I package an upgradable Experience Builder Site?

I need to provide an unlocked package containing a customizable "starter kit" for using features of my managed package so customers have an easy starting point to create their own experience....
0
votes
0answers
34 views

2GP Managed Package Installation Error: (My_Flow) A flow can’t be triggered by My_Event__e records. Change the object in the Start element

I have a 2PG Managed Package which includes two Flow which use Platform Event as the starting object. When we try and install the Beta package into a Scratch Org it fails with error: (On_My_Flow1) A ...
0
votes
0answers
21 views

Provider Free Capacity [duplicate]

I've updated the cachePartition metadata of a 2GP package, which has previously passed security review. <platformCachePartitionTypes> ... <allocatedPartnerCapacity>2</...
1
vote
0answers
19 views

Issue while promoting 2GP beta package to Managed Package

We are facing one issue while promoting the 2gp beta package to managed package. Please consider the following scenario. Created a package with command - sfdx force:package:version:create -p ...
0
votes
0answers
41 views

2GP: Filtered report charts in Lightning Record Pages can't be packaged (Error with flexipage unknown)

I am facing an Error when trying to package a Lightning Record Page via 2GP but I am not able to push it. The following Error is printed in the Terminal: Account_Record_Page.flexipage-meta.xml ...
4
votes
1answer
158 views

I want to package (unlocked 2GP) a Digital Experience; what metadata do I need?

I have a requirement to package a Digital Experience (aka Community) in a no-namespace, unlocked 2GP using an Experience Bundle. Having looked around, I could only find information about how to deal ...
1
vote
1answer
46 views

Unhandled errors are not coming to user designated for 2GMP

Apex documentation has contradicting information about Second Generation(2GP) Package Apex Unhandled Exception support. This page states that Apex exception errors don’t trigger email notifications. ...
12
votes
2answers
729 views

Extension packages & Licence Management in 2GP

In the first generation of Managed Packages (1GP), you are able to create Managed Extension packages that technically required a base package. Both could be distributed and licensed using the same ISV ...
0
votes
1answer
60 views

Apex compile failure on package installation

While performing a development I replaced a class name (from ExampleCtrl to ExampleController) and a few methods were also renamed. While this package was correctly installed on my scratch org, it is ...
3
votes
1answer
61 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
1answer
24 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
38 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
25 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
60 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
30 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
32 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
189 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
35 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
1answer
101 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
116 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
95 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
42 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
31 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
82 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
224 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
265 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
79 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
150 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
93 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
125 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
59 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
104 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 ...
3
votes
1answer
153 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
34 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
42 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
2
votes
0answers
152 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
121 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
101 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
50 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
24 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?