Second Generation Managed Packages (Part-2)
ฝัง
- เผยแพร่เมื่อ 11 ก.พ. 2025
- It explains about that
how to create Second Generation Managed Package and install the same?
Reference:
developer.sale...
developer.sale... (1 GP & 2 GP Comparison)
developer.sale... (Package Ids and Aliases)
developer.sale... (Before You are creating 2 GP Managed Packages)
developer.sale...
developer.sale...
You speak very well. Your logic is clear, which makes it very easy for me to understand. Thank you very much.😁
Thank you and you are welcome
very important session for learning purpose
Hey, thanks for the video. What I dont understand here is that we have 2 orgs: DevHub and Namespace, both are developer edition. Where should I develop my changes (to be included in the package later on)? Can I make the changes directly in the org, meaning do it without using scratch orgs?
In addition, I assume vscode shall be conected to the org where the changes are developed and all the components to be included in the package must be retrieved prior to the package creation, but its not required to be logged in the org in vscode when running it?
Hi, you are welcome.You can do code in any org which doesn’t need to be your devhub and namespace org,atlast you have to do package with Sfdx commands. Better to avoid coding in both namespace org and DevHub org.
Make sure you check that last video on this playlist for current SFDx commands
2GP Packages
th-cam.com/play/PL-JzyFWuCbkK8I0Q678PA3SLk9QfyOetx.html
Thanks for the video that walk through the whole process stey by step
You are wellcome 😊
Hello, My query is - I have created a beta version using this and installed it on another org, and when i am testing it , Only the first page is showing in the org,Button click navigation is not working,
Note- I am navigating same component on button click,i dont have and parent child component,its the same component which is navigating to another page as well.
Its working perfactly in Dev org, but not working in testing org
Hello and thanks for this tutorial! When I try to create version, I encountered an error like : Component [console:relatedRecord] attribute [lookupFieldName]: Cannot accept value [%s] for lookup field value for related record component .Case__c. Do you have any idea how to resolve this issue ? Thanks in advance !
Please check syntax once
Hi, I am facing an error while creating the version using the command.
No matching source was found within the package root directory: force-app
Could you please help me with this?
Ok i cleared this but after creating the package, it's version and promoting it, I am not able to see it in the FRONT-END of my dev hub org. I am unable to see it in the package manager
In dev hub you can’t see it but you can see them in your json file which you use for generating package and you can see list of versions by using SFDx commands
developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_package.htm
Hello sir , i tried to promote the package and enterd the command , but i got this error :- Code coverage has not been run for this version. Code coverage must be run during version creation and meet the minimum coverage requirement to promote the version. How i can resolve it ?
Create other version , make sure you add necessary details in command to test code coverage as well while creating version and then promote nee version
thanks a lot for your reply sir , the error is resolved @@salesforcetechbook I just have one doubt , Can we promote each and every version ?
@roopalbhave yes if you have code coverage
Hi @@roopalbhave you can promote each and every version. Always make sure to include ancestor version in your file before promoting.
sir we have a existing 1GP package can we convert it into 2GP using this steps?
Hello Teja, yes but you need to create new namespace and start doing it . There is no direct conversion to 2GP package with simple click for sure
Thanks for the Video i do have some Questions, glad if you clear this
1. How you get the data or source or App from namespace org(SourceOrg) to Dev Org.
2. Only Linking namespace is enough or We have to do anything else?
You are welcome.
Please go through all the videos under the play list 2GP Packages then you will get answers for your questions.
I am facing this error while creating versioning:
ERROR running force:package:version:create: No matching source was found within the package root directory
How to tackle this issue?
Solved: Needed some components in the directory for this command to work.
Hi Frenix,Why don’t you post your solution as well.It will be helpful for all salesforce professionals in our channel
@@salesforcetechbook Where do you suggest I post this solution?
Thanks for your effort in making these videos, it has been immensely helpful 🙏
Thank you .Here in the comment itself you can post. Everyone can see that when they watch this video
To be really clear, just blindly executing the same steps that is shown in the video is not sufficient to create a managed package. We also need some components like obects or fields or apex classes to exist in the "force-app" folder. Executing the force:package:version:create command without any components in a newly created project will result in the above mentioned error.
Sir , I am getting so many errors while creating package version ..
Hi Akshay,
Follow step by step with very minimal components first. Then you can understand.
@@salesforcetechbook getting errors like variable not found while creating version of package
Hello,
Your video was very helpful.
I tried create package but have few queries if you can answer
1. What if there are pre install steps like adding roles which are used as filters in reports and roles cannot be added to second gen package.
But while creating version it's failing, as the org in which it is validating does not have role.
How can this be handled ?
2. Which org does Salesforce validate the code with for packaging ?
3. There are many org setting or some features that needs to be enabled and used in my code. How can I enable them and then create package ? As sf is validating in the org without any of those features enabled and it's failing.
1.few has to be either pre deployment activities or post deployment activities based on situation
2.2GP packages get generated from the code in version control system .There is no need of maintaining separate org for generating packaging .only for installing you need org.
3.you can add feature settings .just have a look once sf documentation about settings related to features and licenses under feature settings
bro do you have any idea that can we convert 1GP package to 2GP using this process?
You can’t convert directly just like that. You need new namespace to create 2GP packages from source code.
thank you for the video how can I find my org alisa name
It’s not from Org.you can define your own alias
@@salesforcetechbook thank sir for you replay