Skip to content

Commit

Permalink
Update overview.md
Browse files Browse the repository at this point in the history
function support change.
  • Loading branch information
sbudhirajadoc authored Nov 6, 2023
1 parent 6bd1ab8 commit 196a650
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions docs/_articles/en/functions/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,16 @@ lang: en

## Salesforce Functions

Use the Salesforce Functions features in VS Code to build event-driven, elastically scalable apps and experiences. You can create and test functions against sample payloads locally in VS Code.
The Salesforce Extensions pack no longer support Salesforce Functions. We're listing equivalent CLI commands that you can use to create and start a Function.

### Create Function

Run `SFDX: Create Function` to create a Salesforce Function in Javascript, Typescript, or Java in a Salesforce DX project.

This command creates a new directory named after your Function name and all the supporting files.

- VS Code creates the basic scaffolding that contains files with some rudimentary, boilerplate code and supporting metadata.
- The `package.json` file contains information about dependencies.

![Create Function](./images/vs_code_create_func.gif)
See [generate function](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_generate_commands_unified.htm#cli_reference_generate_function_unified).

### Start Function

Run `SFDX: Start Function` to run the function locally.

### Invoke Function

The Salesforce extensions add the `Invoke` and `Debug Invoke` CodeLens to a file that is in the correct format to send test events to a Function that is running locally. With one click, you can test a function that is running, by invoking it with a mock payload. You can also debug the function against the payload.

A sample `payload.json` file that can invoke a function:

![Invoke Debug ](./images/vscode_func_payload.png)

### Stop Function
See [run function start](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_run_commands_unified.htm#cli_reference_run_function_start_unified)

Stop a function by running `SFDX: Stop Function`, which simply kills the local process.

### Resources

Expand Down

0 comments on commit 196a650

Please sign in to comment.