SFDX

Shop owner having a break from her work as a barista dreaming of bigger business

Prerequisite:

Enable “Dev Hub” in your Production Org.

1. Log in to the Dev Hub

To authorize the Dev Hub, use the web login flow

sfdxauth:web:login -d -a DevHub

Log in with your credentials

sfdxforce:org:open -u DevHub

2. Create Scratch Org

project-scratch-def.json

{ “orgName”: “Cybersource”, “edition”: “Developer”, “features”: [“Communities”, “B2BCommerce”, “OrderManagement”], “settings”: { “lightningExperienceSettings”: { “enableS1DesktopEnabled”: true }, “securitySettings”: { “passwordPolicies”: { “enableSetPasswordInApi”: true } }, “experienceBundleSettings”: { “enableExperienceBundleMetadata”: true }, “communitiesSettings”: { “enableNetworksEnabled”: true }, “orderManagementSettings”: { “enableOrderManagement”: true }, “orderSettings”: { “enableOrders”: true, “enableEnhancedCommerceOrders”: true, “enableOptionalPricebook”: true } } }

sfdxforce:org:create -s -f config/project-scratch-def.json -a GeoAppScratch -v devHub -d 30

  • The -s option indicates that you want this scratch org to be the default org for this project when running Salesforce CLI commands. To use a different org on a per command basis, you can specify the -u argument and specify another alias.
  • The -f option is the path to the project scratch org configuration file.
  • Remember our friend, the -a option, from the previous unit? It lets you refer to the org using its alias, GeoAppScratch, in future commands that accept the -u parameter.

We don’t recognize this namespace: cybs. Did you register it in your Dev Hub org?

Link the namespace in devHub

3. open scratch org

sfdcforce:org:open -u <scrachOrgalise or username>

4. Push code to sratch org

sfdx-project.json is required

{ “packageDirectories”: [ {“path”: “force-master”, “default”: true}, {“path”: “force-billing”} ], “namespace”: “cybs”, “sfdcLoginUrl”: “https://login.salesforce.com”, “sourceApiVersion”: “50.0” }

5. Set expiration date

Share on

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Related Posts

LWC vs Aura

LWC LWC uses core Web Components standards (Native browser APIs) and provides only what’s necessary to perform well in browsers supported by Salesforce. Because it’s

Marketing Cloud Basics

It enables you to know your customer, personalize with intelligence, and engage across the entire journey. It’s the only integrated customer engagement platform that enables

SFDX

Prerequisite: Enable “Dev Hub” in your Production Org. 1. Log in to the Dev Hub To authorize the Dev Hub, use the web login flow

Platform Events

Platform event is based on Event-driven architecture. Unlike request-response communication models, software architecture built on an event-driven model decouples event producers from event consumers, thereby