Last active
July 1, 2021 10:22
-
-
Save msrivastav13/581ea2a1ad8199707a444c08434b740d to your computer and use it in GitHub Desktop.
salesforce functions cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create a salesforce functions | |
$ sfdx evergreen:function:init <MyFunction> -l typescript -m force-app/main/default | |
// Start a function | |
$ cd functions/MyFunction | |
$ sfdx evergreen:function:start --verbose | |
// $ sfdx evergreen:function:invoke \ | |
http://localhost:8080 \ | |
--payload='{"fields":["Id","Name"]}' \ | |
-u <your scratch org alias> | |
[Win] | |
$ sfdx evergreen:function:invoke ^ | |
http://localhost:8080 ^ | |
--payload='{\"fields\":[\"Id\",\"Name\"]}' ^ | |
-u <your scratch org alias> | |
[Win Powershell] | |
$ sfdx evergreen:function:invoke ` | |
http://localhost:8080 ` | |
--payload='{"fields":["Id", "Name"]}' ` | |
-u <your scratch org alias> | |
//Deploy the function steps | |
//Set target | |
$ sfdx evergreen:target:set MyTarget -s Helsinki -a imageprocessingapp | |
// login | |
$ sfdx evergreen:auth:login | |
// Deploy command | |
$ sfdx evergreen:function:deploy -t MyTarget | |
// Bind Function | |
$ sfdx evergreen:org:bind "instance name" -t MyTarget | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment