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
1 answer
34 views

Unexpected flexipage behaviour when created 2nd gen package

I've meet the unexpected problem with flexipage when create 2nd gen package. I've received an error looks like (SObject_Record_Page) Component [console:relatedRecord] attribute [lookupFieldName]: ...
0 votes
1 answer
62 views

2gp package with dependency upgrades

Given the following example. 1 - Is it possible to make such reference happen given the fact that the dependent package exist through the same namespace? 2 - if the previous statement is true, then ...
0 votes
1 answer
35 views

2gp error when installing unlock package into empty sandbox: Complains re existent Email Template in unfiled-public folder

We've created first version of our unlocked 2gp package. Bunch of custom email templates have been packaged as a part of unfiled$public folder (including MyCustomPackagedEmailTemplate one). Now when ...
  • 2,875
1 vote
1 answer
32 views

Self certify that the package is lightning ready

How do I certify that my package is Lightning ready? Is that something that we have to raise the case with the community? In the checklist, it shows that I have to "Self-certify listing as ...
  • 328
1 vote
0 answers
29 views

'Select Listing Name to Scan' is empty in the Partner Security Portal

As mentioned by @phil in Sending review to the checkmarx where multiple developments are included I have gone to partner security portal. Though the packages are being displayed in the partner ...
  • 328
0 votes
1 answer
23 views

Sending review to the checkmarx where multiple developments are included

I have a org that is connected to the partner community. In this org, there are managed packages, unmanaged packages, and various other developments that includes code that is not required for the ...
  • 328
0 votes
2 answers
37 views

Is there a way to run tests for a 2GP package in development, without creating a new package version?

I am developing a 2GP package. In order to run tests, I've had to create a new package version and install it in a scratch org (via sfdx). Is there a way to run tests after code changes without having ...
0 votes
1 answer
37 views

How do you properly include metadata in an unlocked package for custom fields that already exist in Production?

When creating an unlocked, second-generation package for a new Lightning Web Component, how should you include the requirement for a custom field to exist if that field already exists in the ...
  • 201
0 votes
1 answer
42 views

Put unit tests in unpackaged metadata?

We were having discussions about putting unit test data in static resources. The concern was that the test data is not needed by the application itself, only the unit tests, so do we want to have this ...
0 votes
1 answer
55 views

Trying to create 2GP package version - getting "Could not infer a metadata type"

Am starting to build Lightning Web Components that will need to call an external API. Looks like I need to add CSP Trusted Sites and Remote Site Settings. So I created folders in /force-app/main/...
0 votes
1 answer
52 views

Enable Change Data Capture via Apex

As part of a second-generation managed package, need to enable Change Data Capture (CDC) for the Opportunity object. Can this be done via Apex in a PostInstall for the managed package? Been Googling ...
0 votes
1 answer
22 views

Permission Sets distributed in a Managed Package

My 2GP includes a handful of custom fields on the Opportunity object. Users (who already have access to Opportunity) need to be able to see them but we don't care whether they modify them because our ...
1 vote
0 answers
29 views

Associating Custom Settings with a Connected App in a 2GP

In our 1GP, there is a Custom Settings object and a Connected App. On orgs where the 1GP is installed, if you go to Setup -> App Manager, select the Connected App in the list and pick Manage, you ...
1 vote
1 answer
67 views

Error when creating beta 2GP version - Can’t create patch version

When I type: sfdx package:version:create -p 0Ho... --installation-key-bypass -b 2gp-internal I get an error: ERROR running force:package:version:create: Can’t create patch version. Log a case in ...
0 votes
0 answers
19 views

CumulusCI 2GP Beta Release Permissions Issue

I have some unit tests failing during a 2gp beta release due to the running test user not having the proper field-level permissions. I've followed the documentation here and defined the permission set ...
2 votes
1 answer
94 views

Second-generation Managed Package with dependency on first-generation Managed Package

Creating a second-generation Managed Package (2GP) that has a dependency on a released first-generation Managed Package (1GP). This is what I want the version progression for the package Connector for ...
3 votes
1 answer
102 views

HealthCloud extension can't write HC object. Permissions are ignored

I am developing a Managed Extension Package for HealthCloud. My app is inserting those native HC objects: Board Certification Business License Healthcare Facility Healthcare Provider Health Provider ...
1 vote
1 answer
76 views

Can't add Forecast/Quota report to Managed Package

I want to add a report and dashboard to my 2GP package, which visualizes Opportunity Forecasts and Quota. I know that not all orgs have this feature enabled. When I try to package a Report Type using: ...
1 vote
0 answers
20 views

Unable to create a new version of a 2GP package depending on an Ancestor

I want to create a new version of my package every time we try to do so we have the same errors: Account.XXXXX__c: The entity: Account does not have history tracking enabled Contact.XXXXX__c: The ...
1 vote
1 answer
170 views

Second Generation Package version. Can I assign a permission set when creating a 2gp?

Updating my Question Again : I started a new project, got fresh source and created a new package. No problem. Still stuck on creating a new version with eh same Project-scratch-def.json and sfdx-...
-1 votes
1 answer
41 views

Variable does not exist: ContentNote

We are trying to create the version of the 2GP managed package in a Scratch Org in Salesforce. But Getting alot of Errors related to 'ContentNote'.kindly Suggest us the solution for this error.
  • 1
0 votes
0 answers
27 views

Are custom protected settings hidden from scratch org admin for second generation beta managed packages?

I've read that protected custom settings in managed packages are hidden completely from the subscriber org. I'm currently building a second generation managed package that I've generated a version for ...
  • 1
0 votes
0 answers
52 views

Getting a alot of errors while creating the 2GP Unlocked Package

While creating the Package version after a long wait of 'verifying metadata' it shows me a lot of errors related to Apex classes, objects and their fields that this custom metadata doesn't exist in ...
0 votes
1 answer
38 views

Can we distribute a package before sending it for the security code Review?

Basically, we are an ISV partner and want to deploy our App to the AppExchange for our customers. But due to the shortage of time for the security review, we're unable to upload it to the AppExchange. ...
3 votes
3 answers
199 views

Develop Analytics Templates in 1GP and 2GP packages

I want to build a Managed Packaged with TCRM / CRM Analytics / Einstein Analytics elements in a distributed fashion using SFDX, Version Control and Scratch Orgs. I understood from the documentation ...
1 vote
1 answer
39 views

Test package-specific logic in yet unpackaged code

We need to use package-specific logic like: Getting the number of Package Licenses (PackageLicense) available in the org This value can be only obtained after packaging the app and installing it on ...
  • 113
0 votes
0 answers
48 views

How to efficiently package email templates into 2GP

What is the best way to package email templates into managed packages, and allow to use them by admin (not necessarily by the one that installed the package) just after installing it? I was thinking ...
  • 113
2 votes
1 answer
60 views

Package a Default for an FMA Date Feature Parameter

What is the goal? The goal is to track when the managed package was installed on the customer's org and be able to read the date on the customer's side. What is the current solution I am thinking of? ...
  • 113
1 vote
1 answer
25 views

Not able to promote the package to production after removing metadata

I removed some metadata components from my 2GP package. I had gotten the access to this feature by logging a case in partner portal. After removing the metadata, I was able to create a new package ...
  • 941
0 votes
0 answers
73 views

Installing NPSP into a pre-existing Salesforce Org

I am installing NPSP into a pre-existing org which uses the standard Account model. The idea is to install NPSP + related products (i.e Accounting Subledger, V4S) into a pre-existing org. It is ...
0 votes
1 answer
138 views

When Lightning Knowledge is enabled, you can't add an article type

I am trying to install my package into our demo org and received this error: ERROR: Encountered errors installing the package!,Installation errors: 1) (Knowledge__kav) When Lightning Knowledge is ...
0 votes
0 answers
92 views

Package creation Error

I am trying to create a new version of the manage package and if i run the command sfdx force:package:version:create --package "PackageName" --wait 10 --codecoverage --installationkeybypass ...
1 vote
0 answers
41 views

2GP push to default scratch org

I am in a managed package , the language of my dev hub is french and I think that create me some error when I tried to push on a SO (french or english) I receive the following error : /Users/Name/...
1 vote
2 answers
623 views

An internal server error has occurred\nError ID: 795864710-26263 (-1279386781)

I started getting this error with new orgs I created for testing. my old orgs work with same code. FWIW, it is a 2GP managed package app. It works in development environments (before packaging it) and ...
0 votes
1 answer
39 views

Should unlocked package tests that reference unpackaged metadata fail in subscriber org?

I'm new to packaging so apologies if this is an obvious question. When running the unlocked packages tests that reference unpackaged metadata in the SUBSCRIBER ORG, are these tests expected to pass? ...
1 vote
1 answer
57 views

What are the consequences of using 2GP but not distributing via the AppExchange?

I'd like to create a managed package to release to customers. Salesforce promote 2GP as the way forward for greenfield projects like this. However, I'm not interested in signing up as an ISV partner, ...
  • 227
1 vote
0 answers
31 views

How to Reference a Canvas Connected App in a 2GP Managed Package

I am looking to create an app that would be distributed via AppExchange. So this would be a 2nd Generation managed app. I have created the following components: CustomApplication ConnectedApp Pages ...
  • 11
1 vote
0 answers
40 views

Unable to create a package version for second generation managed package

I'm trying to create a 2G managed package. The following were the steps I used sfdx force:package:create --name newManagedPackage --packagetype Managed --path force-app I was able to create a ...
  • 672
1 vote
2 answers
227 views

What are best practices for global class / method in 2GP in AppExchange?

As part of my 2GP application (for AppExchange) I want to define single apex class as global to expose piece of logic to users.  What are the implications of defining a global class and a global ...
1 vote
0 answers
30 views

How to configure OAuth scopes for connected apps in 2GP

I'm confused about how the configuration of connected apps in a 2GP work. I've found a couple helpful pages in the documentation, but feel I'm still missing some important details. I currently have a ...
1 vote
0 answers
33 views

Refresh token issue for Connected App in 2GP Managed Package

I have an issue related to Connected App in 2GP managed package. I use OAuth 2.0 Web Server Flow for Web App Integration. I have 3 absolutely identical Connected Apps created on PBO edition org (no ...
0 votes
1 answer
93 views

Re-link a 2gp package to new devhub org

I created a managed package which is linked to a dev hub org (developer edition org). It is working fine and I am able to create new versions and all that. But now I got a new PBO org as I plan to ...
0 votes
1 answer
238 views

2GP Managed Package : ERROR running force:package:version:create: while Verifying Metadata Invalid type: namespace__CustomObject__c

I am trying to create a managed package version for 2GP using salesforce CLI, after running force:package:version:create command I am getting thousands of errors in the terminal I am only able to see ...
  • 3
0 votes
1 answer
79 views

Salesforce Partner Security Portal is not listing our package

We are currently in the process of developing a 2G Manage package. We have a Partner Business Org setup, which is also acting as our dev hub. This was done on the advise of our Salesforce Rep. Further,...
0 votes
1 answer
271 views

What directories does a sfdx force:package:version:create include?

I've typically worked where there is only one root directory in an SFDX project (force-app). So I've imagined that the packageDirectories in sfdx-project.json act as the source/sources of the files ...
  • 133k
4 votes
2 answers
124 views

Any way to list the contents of a 2GP (second generation package)?

I have an obscure error when installing a 2GP beta package about a component I don't expect to be the in the package. Is there a way to list the contents of a package given just a package version Id ...
  • 133k
0 votes
2 answers
62 views

How to remove 2gp package password using SFDX?

Can we able to remove the published package password or remove it? We have already submitted the package now we need to remove the password how to do it using sfdx. sfdx force:package:version:update -...
  • 371
0 votes
0 answers
68 views

Unable to access BuyerGroupId field on B2B 2GP

Hello Salesforce Ecosystem! I have the following problem on a 2GP B2B App. We have a simple endpoint that is meant to receive Account Ids and based on those Accounts (Buyer Accounts) we need to ...
15 votes
2 answers
789 views

Modularize (existing) LWC for reuse and flexible distribution

I am currently breaking a monolithic 1GP Managed package into more modular 2GP packages. While doing this I also want to decompose chunky LWC components in a way so they can be reused more flexibly ...
0 votes
1 answer
156 views

Getting error when creating 2gp package version

Getting following error Add components {Profile=[Admin]} back into the package version, and create the package version again. This is my current sfdx-project json of managed package : "...