Second-Generation Managed Packages
Himanshu Sharma ??
5x Salesforce certified || AppExchange || Einstein || Sales Cloud || Service Cloud || Experience Cloud || Apex || LWC || Salesforce Configuration || Salesforce Developer
Managed 2nd Generation Packaging (Managed 2GP) introduces a fresh approach for AppExchange partners to craft, disseminate, and oversee their applications and metadata. Leveraging Managed 2GP packaging enables you to structure your source efficiently, construct compact modular packages, seamlessly integrate with your version control system, and optimize the utilization of your custom Apex code.
Step 1 -> Create NameSpace (Skip if already registered)
Step 2 -> Link the namespace with the Dev Hub org.
领英推荐
Step 3 -> Launch VS Code with all the metadata (Apex Class, Layout, LWC, etc.) you need for packaging.
sfdx force:auth:web:login -d -a <devHubAlias>
sfdx force:config:set defaultusername='username____'
{
"packageDirectories": [
{
"path": "force-app",
"default": true,
"package": "__PackageName",
"versionName": "ver 0.1",
"versionNumber": "0.1.0.NEXT",
}
],
"namespace": "__Namespace",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "59.0"
}
sfdx package create --name "__PackageName" --path force-app --package-type Managed
sfdx package version create --package "__PackageName" --code-coverage --installation-key __Password --wait 10
Thank you
? Tu empresa trabaja con Salesforce? Te ayudo crecer con el ERP de EGA Futura y con los servicios de Vantegrate ? | Founder, EGA Futura ? | Co-Founder, Vantegrate ?? | Salesforce Partner
11 个月Such valuable insights in this post, can't wait to level up my Salesforce development skills! Himanshu Sharma