Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [second-generation-packaging]

Filter by
Sorted by
Tagged with
13 votes
2 answers
850 views

fflib as Second Generation Managed Package (2GP)

So, in a project of mine (a Second Generation Managed Package) I have a dependency on fflib. My initial idea was to include fflib-apex-common and fflib-apex-mocks as 2GPs with the same namespace as my ...
lightxx's user avatar
  • 271
13 votes
2 answers
769 views

System.requestVersion() does not work in Second Generation Packaging

Environment sfdx-cli/7.58.2 win32-x64 node-v12.16.3 API 48 What's going on? When trying to create a managed packaged version with Second Generation Packaging (2GP) -with code check- that contains ...
Louis Bompart's user avatar
9 votes
0 answers
341 views

Managed Package error emails behaviour changed?

I have a First-Generation Managed Package that was updated and released for years. It's current version is 6.0. I just recent added a User to the Package page to get error notifications as described ...
Robert Sösemann's user avatar
8 votes
2 answers
2k 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", ...
Tyler Dahle's user avatar
  • 2,709
8 votes
1 answer
3k 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 ...
Brian Miller's user avatar
  • 5,222
6 votes
2 answers
1k 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 ...
J Dubbs's user avatar
  • 392
6 votes
1 answer
424 views

How are global classes and/or components treated in 2nd Generation Packaging (unlocked and managed)

In 1st generation packaging, a global class cannot be modified after a managed release (and installation). There have been numerous discussions like this one on handling / upgrading / deprecating ...
Christian Szandor Knapp's user avatar
6 votes
1 answer
170 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 | ^---...
sfdcfox's user avatar
  • 494k
6 votes
1 answer
276 views

Type.forName(..) returns null for Unlocked Package with Spring 20' release

It seems that Salesforce Spring 20' release made public classes part of Unlocked 2GP not accessible when @namespaceaccessible is not mentionned. That has a huge impact. I thought this annotation was ...
Lucas Ennouchi's user avatar
6 votes
1 answer
1k views

Do tests in unlocked packages execute when deploying unpackaged apex code to production?

I'm sorry for the cryptic title. I'm curious what tests are forced to run when deploying to production, if that production org contains unlocked packages. Lets say we have the following test classes ...
Andreas86's user avatar
  • 357
6 votes
1 answer
635 views

Gen2 Package, ancestor version creation failing without any code changes for 2GP Managed package

I have the following issue with the Second Generation Package, I have this Apex class: global with sharing class TestClass { global virtual class B { } global class C1 extends B { } ...
Louis Bompart's user avatar
5 votes
3 answers
834 views

Second-Generation Managed Package Security Review

Generally, the question stands as what steps need to be done in order to send 2-nd generation managed package for security review. Current conditions: I have developed 2-nd generation managed ...
Oleksandr Berehovskyi's user avatar
5 votes
3 answers
677 views

Second-Gen Packaging Migration and Winter 21 release

There is a Salesforce Developers YouTube video from Dec 13th 2019: Introducing Managed Second-Generation Packages Which hinted that the Winter 21 release would include: Enabled migration of first-...
Robs's user avatar
  • 9,346
5 votes
1 answer
264 views

Anyone having problems creating a scratch org / promoting a package version today (Aug 12, 2020)? I seem to be getting Winter '21 orgs!

Sorry upfront as this is going to be a bit of a rambling question. Today I was creating a package using 2nd Generation packaging and as part of my process I install the new package into a test scratch ...
Vincent Ip's user avatar
5 votes
1 answer
821 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 ...
mcekol's user avatar
  • 83
5 votes
1 answer
736 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: [...
Keith C's user avatar
  • 136k
4 votes
2 answers
470 views

Error when generating package version with values in account standard picklist

I have a couple of values on the Account's Type field in a managed package. A couple of days ago I generated a package version successfully, but now when generating a new version I'm getting this ...
Renato Oliveira's user avatar
4 votes
2 answers
409 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 ...
Keith C's user avatar
  • 136k
4 votes
1 answer
1k views

Platform event API name imported in LWC uses "c" instead of "e" as suffix?

I'm trying to make a component in a managed package to subscribe to a certain platform event, and referencing the channel with its API name previously worked: import BATCH_EVENT_NAME from '@...
Renato Oliveira's user avatar
4 votes
0 answers
38 views

2gp Patching is Failing Even When the Only Change is a Comment [duplicate]

I'm currently trying to get patching working for our 2gp managed package but it's consistently hitting the same set of errors around report folders and report filters (see screenshot). Now I know what ...
Shane Bird's user avatar
4 votes
0 answers
42 views

Extending metadata xml without overwriting in org

I'm creating a 2GP managed packaged that adds a custom tab to the Service Console. While developing in a scratch org, the metadata pulled into my project includes a customised version of the Service ...
davidpanaho's user avatar
3 votes
1 answer
2k views

2GP Source Push Error: The consumer key is already taken

I am trying to migrate metadata from a Partner Developer org to a Partner Developer scratch org for use with second-gen packaging. I have downloaded the 1GP package, converted the metadata, and now I ...
Robs's user avatar
  • 9,346
3 votes
2 answers
434 views

Can 2GP Packages be deleted?

Due to limitations with extension packages and SFDX Must have a package installed to push extension code Inability to view debug logs from base when installed in extension SFDX org we have had to ...
Eric's user avatar
  • 54.2k
3 votes
1 answer
430 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 --...
Keith C's user avatar
  • 136k
3 votes
1 answer
72 views

Not able to delete second generation unlocked package

I have accidentally created two packages and I want to delete one of them. I tried the below command. sf package delete --package "my-pckg" --target-dev-hub my-dev But it results into the ...
Rahul Gawale's user avatar
  • 12.2k
3 votes
1 answer
355 views

Error while creating a 2G Package version: Insufficient permissions: secure query included inaccessible field

Hope you're having a good day. I need some help resolving a problem I am facing while developing a 2nd Generation Managed Package. Following the ISV and SFDX Guide, when I create a 2G Package version ...
Asadullah Shaikh's user avatar
3 votes
1 answer
865 views

@namespaceAccessible class's properties are not accessible from another package

I am trying to create two second-generation (2GP) packages with the same namespace but running into an issue where one of the packages is not able to access the properties of a class from the other ...
Vinod Rondla's user avatar
3 votes
1 answer
265 views

How to use .forceignore for scratch org push but not for packaging

I'm trying to package connectedApp using 2nd generation packaging as instructed here: https://salesforce.stackexchange.com/a/325175 However, the special xml file creates a conflict between scratch org ...
dzh's user avatar
  • 4,125
2 votes
1 answer
602 views

2GP: How to set Managed Package Publisher Name

How do I set an App's Publisher Name? Looking at the Project Configuration File for Packages I cannot see anywhere in the sfdx-project.json where it could be added. Using 1GP it was set in the ...
Robs's user avatar
  • 9,346
2 votes
2 answers
455 views

2GP Managed Package: Admin Profile changes

Is it possible to package and ship permission modifications to the System Administrator profile in a Managed Package or not? If not, am I right in assuming permissions should be shipped as a ...
Robs's user avatar
  • 9,346
2 votes
1 answer
116 views

Is there any way to implement a smooth customer migration from 1GMP to 2GMP?

I build 2GMP for client who has many customers installed their previous 1GMP version of the package. I couldn't figure out how to make this process smooth enough with simple upgrade so they have to ...
Patlatus's user avatar
  • 17k
2 votes
1 answer
1k views

Guidelines on the process of converting the first generation manage package to second generation manage package

We are an ISV and we have a managed package already in app-exchange which clients are already using it for few years. Last year we have migrated our codebase to to sfdx and all are working fine now. ...
Bikram Bhuyan's user avatar
2 votes
1 answer
282 views

Lightning Message Channel deletion from 2GP or isExpose change to false

we failed security review of second-generation managed package because Lightning Message Channel (LMC) has isExposed=true. It should be false. The value of isExposed is not possible to change to false,...
rstrader's user avatar
2 votes
1 answer
1k views

2GP: ERROR running force:package:version:create: MyApp: Installing an app (MyApp) that has been deleted

I am trying to create a Managed package version. But when I run the command: sfdx force:package:version:create --package "MyApp" --postinstallscript AppInstallHandler.cls -w 10 --...
Robs's user avatar
  • 9,346
2 votes
1 answer
157 views

2nd gen package profiles issue

I stuck with issue with choosing custom profiles when 2nd gen package is installed. Package provides only 'No Access' and 'Full Access' settings, but in my project there are some custom profiles which ...
oldgunner's user avatar
2 votes
1 answer
212 views

Creating a Second Generation Managed Package with configuration link

I am creating a second-generation managed package and Install, After the Installing package there should be a link: which navigates to the lightning component present in the package and sets the ...
Deep's user avatar
  • 33
2 votes
1 answer
277 views

Second generation packaging: Include same artifact into two or more packages withing same namespace

We are trying to split our huge monolithic 1st generation package into smaller chunks of 2gp packages sharing the same namespace. There are a lot of challenges and tough decisions to make here. But in ...
wesaw's user avatar
  • 3,080
2 votes
1 answer
81 views

Using Protected Custom Setting in Flows in 2GP Managed Package

I created a 2GP managed package that includes a protected hierarchy custom setting (let's say it is called namespaced__Protected_Custom_Setting__c) for some configuration that needs to be hidden from ...
tugce's user avatar
  • 2,655
2 votes
0 answers
117 views

How does Permission Sets works against Licenses of Managed Package

We have built a Second Generation Managed Package and want it to be available as paid version in AppExchange Portal. So If a user buys it from AppExchange, he/she gets the licenses to use the solution....
S1th's user avatar
  • 143
2 votes
0 answers
84 views

Is it possible to create a second-generation Managed Package with a ConnectedApp without a first-generation Managed Package?

Looking at Salesforce's documentation, it appears the only way to create a ConnectedApp in a second-generation Managed Package is to first create it in a first-generation Managed Package? Is this true ...
nstuyvesant's user avatar
2 votes
0 answers
81 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 ...
Rink Stiekema's user avatar
2 votes
1 answer
74 views

2GP Patching Fails Due to Missing SalesProcess Value Even Though Same Code Packages Fine

We've been trying to patch with 2GP for a few months now but we're constantly hitting errors even when the only change is a comment in an apex class. Many errors were around reports so to try to get ...
Shane Bird's user avatar
2 votes
0 answers
440 views

2GP: How to Upgrade Beta Managed Packages

Is there any way, or is there any plan (safe harbour) to make it possible to upgrade a Beta managed package without needing to uninstall the previous version first?
Robs's user avatar
  • 9,346
2 votes
2 answers
253 views

Release new version of unlocked package

I have a sfdx-project.json for my unlocked package. Version 1.0.0-11 was promoted. { "packageDirectories": [ { "path": "force-app", "default": true, "...
Eugene Vabishchevich's user avatar
2 votes
2 answers
1k views

Why I am getting error while Promoting Second Generation Package with dependent packages?

UPDATE: Facing the same issue even without package dependency. I am trying to promote a Pkg2 with a dependent package Pkg1. Both packages are 2nd generation manage package in the same namespace. I am ...
Sushant Srivastava's user avatar
2 votes
0 answers
52 views

Getting "Not available for deploy for this organization" when creating a package version with translations. Is there a particular reason? [duplicate]

I'm getting the following error running the command to create a new version of my package. In this version I just added the translations for Brazilian Portuguese. ERROR running force:package:...
Renato Oliveira's user avatar
2 votes
1 answer
911 views

Adding a post-install script to a second generation managed package

I'm creating a second gen managed package using sfdx and I'm not sure how to add a post-install script. Most information I've come across involves updating the package from within an org. Is this ...
davidpanaho's user avatar
1 vote
1 answer
508 views

AppExchange Security Review Requiring Fee Submission for FREE Listing Solution

Hope you are having a great day. We have developed an AppExchange solution to be listed. The solution's pricing model is set to free and the listing is submitted for approval. I have completed ...
Asadullah Shaikh's user avatar
1 vote
1 answer
1k views

In depth aspects of 1gp to 2gp Managed Packages conversion [closed]

Suppose, there is a 1gp Managed Packaging Org, namespace prefix: abcxyz. Several beta-release versions exist. Now, I want to move to the 2gp Managed packaging. So, I linked the devHub org and going to ...
Mehedi's user avatar
  • 409
1 vote
1 answer
216 views

2GP: Dependent class is invalid and needs recompilation

I am trying to create a Managed package version. When I run the command: sfdx force:package:version:create --package "My App" --postinstallscript AppInstallHandler.cls -w 10 --loglevel TRACE ...
Robs's user avatar
  • 9,346