Repository files navigation Salesforce Functions Demo
Get a Functions-enabled org (trial at https://functions.salesforce.com/signups )
Enable Dev Hub (Setup > Development > Dev Hub)
Enable Salesforce Functions (Setup > Feature Settings > Functions)
Clone or create an SFDX project
If creating a new project:
Generate an SFDX project sf generate project -n MyProject -x
Ensure that functions are enabled in the scratch org config file (config/project-scratch-def.json) features": ["Functions"]
Create a scratch org
sfdx force:org:create -s -f config/project-scratch-def.json -a FUNCTIONS002_SCRATCH
Log into functions
sf login functions
Create a compute environment
sf env create compute -o FUNCTIONS002_SCRATCH -a FUNCTIONS002_SCRATCH_COMPUTE
Generate a function framework sf generate function -n processimage -l java
Check changes into the git repository
Deploy functions
sf deploy functions -o FUNCTIONS002_SCRATCH
Connect to an org
SFDX: sfdx force:auth:web:login -a ORG_ALIAS
SF: sf login org -a ORG_ALIAS
Set the default Dev Hub
SFDX: sfdx config:set defaultdevhubusername=ORG_ALIAS
SF: sf config set target-dev-hub= ORG_ALIAS
List connections
SFDX: sfdx force:org:list
SF: sf env list
Deploy Metadata
SFDX: sfdx force:source:deploy -u ORG_ALIAS -m MetadataType:MetadataName
SF: sf deploy metadata -o ORG_ALIAS -m MetadataType:MetadataName
About
Demo repo for Salesforce Functions
Resources
Stars
Watchers
Forks
You can’t perform that action at this time.