Skip to content

Commit

Permalink
docs: update relative links to images folder (#5171)
Browse files Browse the repository at this point in the history
* docs: update relative links to images folder

* Update sidebar.yml

added "(Beta)" to local development.
  • Loading branch information
sbudhirajadoc authored Oct 19, 2023
1 parent 739aad8 commit babef4f
Show file tree
Hide file tree
Showing 22 changed files with 173 additions and 131 deletions.
5 changes: 3 additions & 2 deletions docs/_articles/en/apex/language-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Apex Language Server is an implementation of the Language Server Protocol 3.

For more information, watch the video of our Dreamforce ’17 presentation, [Building Powerful Tooling For All IDEs Through Language Servers](https://www.salesforce.com/video/1765282/).

[![Dreamforce '17 Presentation](../../../images/apex-language-server-presentation-dreamforce-17.png)](https://www.salesforce.com/video/1765282/)
[![Dreamforce '17 Presentation](./images/apex-language-server-presentation-dreamforce-17.png)](https://www.salesforce.com/video/1765282/)

## Integrate with the Apex Language Server

Expand All @@ -21,11 +21,12 @@ See the [languageServer.ts](https://github.com/forcedotcom/salesforcedx-vscode/b

Hover over `{}` in the status bar to view the current status of the Apex Language Server. To always have visibility into the status, pin the status message. The Apex Language Server status is now persistantly visible in the status bar until it is unpinned.

![Apex Language Server Status](../../../images/apexlspstatus.png)
![Apex Language Server Status](./images/apexlspstatus.png)

## Reset Apex Indexing

To clear the Apex Language Server's indexing, delete the `PROJECT_DIR/.sfdx/tools/<Salesforce Release>` directory and restart VS Code.

## See Also

- [Language Server Protocol Specification](https://github.com/Microsoft/language-server-protocol)
Expand Down
10 changes: 8 additions & 2 deletions docs/_articles/en/bugs-and-feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
title: Bugs and Feedback
lang: en
---

## Issues Related to Salesforce Extensions

To report issues with these features, or with anything else related to Salesforce Extensions for VS Code, open a [bug on GitHub](https://github.com/forcedotcom/salesforcedx-vscode/issues/new?template=Bug_report.md).

If you would like to suggest a feature, create a [feature request on GitHub](https://github.com/forcedotcom/salesforcedx-vscode/issues/new?template=Feature_request.md).

## Issues Related to Code Builder(Beta)
## Issues Related to Code Builder

If you encounter any issues using Code Builder, or want to provide other types of feedback, such as initial impressions or feature requests, [file an issue](https://github.com/forcedotcom/try-code-builder-feedback/issues) in the GitHub repo. We want to understand what features and enhancements are important to you.

## Issues Related to Einstein for Developers (Beta)

If you encounter any issues using Code Builder, or want to provide other types of feedback, such as initial impressions or feature requests, [file an issue](https://github.com/forcedotcom/try-code-builder-feedback/issues) in the GitHub repo. We want to understand what features and enhancements are important to you.
If you encounter any issues using Einstein for Developers, or want to provide other types of feedback, such as initial impressions or feature requests, [file an issue](https://github.com/forcedotcom/Einstein-GPT-for-Developers/issues) in the GitHub repo. We want to understand what features and enhancements are important to you.
2 changes: 1 addition & 1 deletion docs/_articles/en/codebuilder/cb-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Working in the cloud has its advantages. However, unlike working on a desktop wh

**Note:** If you don't see Code Builder Dashboard as an option, contact your admin to make sure you have the correct license and permission set assigned to you.

2. Click **Launch** to launch your Code Builder environment. A new environment is created for you the first time to launch. We've also created an empty Salesforce DX project to help you get started. Note that it takes a few minutes for a new environment to be created and loaded.
2. Click **Launch** to launch your Code Builder environment. A new environment is created for you the first time to launch. We've also created an empty Salesforce DX project to help you get started. Note that it takes a few minutes for a new environment to be created and loaded. You know everything is ready when you see “Welcome to Salesforce Code Builder”.

![Code Builder Dashboard](./images/cb_dashboard.png)

Expand Down
7 changes: 4 additions & 3 deletions docs/_articles/en/deploy-changes/detect-conflicts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Detect Conflicts on Deploy
lang: en
---

## Overview

When you deploy source to your default org, the operation could detect conflicts on deploy to help you avoid accidentally overwriting others’ changes in the org. The conflict detection feature can be turned on for any org that is not using source tracking, which is most non-scratch orgs such as sandboxes or dev orgs. Note that this feature is always on for scratch orgs and source-tracked sandboxes.
Expand All @@ -26,10 +27,10 @@ You can also enter conflict detection in the search box to find the feature and

When enabled, conflict detection will check for potential conflicts for all Deploy commands executed from VS Code. Changes based on last sync date are compared for all files that exist both in the org and in the local project; files that don’t exist in both are not considered in conflict. If conflicts are detected on deploy, you can choose to view them or override them to continue the deploy operation:

![Prompt for conflict detection](../../../images/DetectConflict_prompt.png)
![Prompt for conflict detection](./images/DetectConflict_prompt.png)

You can either select to override conflicts or cancel the operation and view the conflicts in the Org Differences view.

You can use [Source Diff](./en/user-guide/source-diff) if you are interested in detecting conflicts in advance of any retrieve operation.
You can use [Source Diff](./en/user-guide/source-diff) if you are interested in detecting conflicts in advance of any retrieve operation.

![Retrieve metadata flow](../../../images/RetrieveMetadataFlow.gif)
![Retrieve metadata flow](./images/RetrieveMetadataFlow.gif)
2 changes: 1 addition & 1 deletion docs/_articles/en/deploy-changes/metadata-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ You can deploy source of a manifest, source files, directories, or folders:
The Source Diff command makes it easier to visualize the changes between files in your local project and the metadata in your org. You can look at diffs for an individual file or directory.
Right-click on a file or folder and run **SFDX: Diff File Against Org** or **SFDX: Diff Folder Against Org**.

![Source Diff command](../../../images/source_diff.png)
![Source Diff command](./images/source_diff.png)

View individual file diffs side by side. A file doesn't show up in the list of diffs if it doesn’t exist locally or in the org.

Expand Down
7 changes: 3 additions & 4 deletions docs/_articles/en/einstein/einstein-apex.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,20 @@ lang: en

Use the Einstein for Developers side bar to write a question or an instruction that describes the task for which you'd like to receive an Apex code suggestion and press **Ask**. Copy the code suggestion you received and paste it into an Apex file to use as "starter" code.

![Sidebar code generation](../../../images/einstein-sidebar.png)
![Sidebar code generation](./images/einstein-sidebar.png)

## Use the Command Palette to Generate Apex Code

You can quickly access Einstein for Developers from inside an Apex file in the VS Code editor.

1. Open an existing Apex (`.cls`) file, or create one from the command palette by running the **SFDX: Create Apex Class** command.
1. Open an existing Apex (`.cls`) file, or create one from the command palette by running the **SFDX: Create Apex Class** command.
2. Put your cursor on the line in the file where you want the generated code to be placed.
3. From the Command Palette, run **Einstein: Generate Code**.
4. For your query, enter a description of the code that you want to generate. For example, “`Write a method that takes an account as a parameter and returns all contacts associated with that account.`
5. Review the code that Einstein generates, and then click **Accept**, **Try Again**, or **Clear**.
5. Review the code that Einstein generates, and then click **Accept**, **Try Again**, or **Clear**.

Use our example prompts to learn how to get the most out of the generative AI tool.

**Tip**: To access the **Einstein: Generate Code** command through hotkeys, press Cmd+r (macOS) or Ctrl+r (Windows or Linux). You can customize these shortcuts. See [Keyboard Shortcuts editor](https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-editor).


You can customize these shortcuts. See [Keyboard Shortcuts editor](https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-editor).
6 changes: 3 additions & 3 deletions docs/_articles/en/einstein/einstein-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ When you enable Einstein for Developers in a supported Salesforce org, all users

2. Turn on Einstein for Developers.

![Einstein Terms and Toggle](../../../images/einstein-terms.png)
![Einstein Terms and Toggle](./images/einstein-terms.png)

**Important**: We encourage you to thoroughly review the license agreement and review all terms and conditions. Then accept to enable Einstein for Developers.

Expand Down Expand Up @@ -78,7 +78,7 @@ The Einstein for Developers tool is run in the context of a Salesforce org, in a

The Einstein logo on the activity bar and in the status bar confirms that the extension is installed. Open the command palette and run `View: Show Einstein Developer Sidebar` to open the sidebar.

![einstein installed](../../../images/einstein-installed.png)
![einstein installed](./images/einstein-installed.png)

### Use Einstein for Developers in a Scratch Org

Expand Down Expand Up @@ -109,4 +109,4 @@ Create a scratch org using the `SFDX: Create a Default Scratch Org...` command r

Run **Einstein: Show Prompt History** from the Command Palette to open the Feedback console. When opened, you can view a running history of your prompts and associated responses. Use 👍, 👎, and comments for each response to provide us with feedback about the quality of the generated code. Your feedback during this beta is key to helping us improve AI model quality and overall product.

![feedback panel](../../../images/einstein-feedback.png)
![feedback panel](./images/einstein-feedback.png)
17 changes: 12 additions & 5 deletions docs/_articles/en/functions/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,38 @@
title: Overview
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.

### 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.
- 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)

![Create Function](../../../images/vs_code_create_func.gif)
### Start Function
Run `SFDX: Start Function` to run the function locally.

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)
![Invoke Debug ](./images/vscode_func_payload.png)

### Stop Function

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

### Resources

For more information see [Get Started with Salesforce Functions](https://developer.salesforce.com/docs/platform/functions/guide/index.html).
31 changes: 19 additions & 12 deletions docs/_articles/en/lwc/lwc-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,43 @@ lang: en
---

## Overview

Create an LWC component called `contactList` that displays contact names and phone numbers in your app. You’ll get the contact information to display from an Apex class called `ContactController`.

Before you start, install [Salesforce Extensions for Desktop](./en/vscode-desktop/install) or [Set Up Code Builder](./en/codebuilder/cb-setup)

### Add an Apex Class that Queries Contacts

1. In VS Code, run the command **SFDX: Create Project** from the Command Palette to create a Salesforce DX project if you don’t have one.
2. Log in to the org to which you want to add the LWC.
3. Run the **SFDX: Refresh SObject Definitions** command from the Command Palette to get completion suggestions for your SObjects related code.
4. From the Command Palette, run **SFDX: Create Apex Class** and create a class called `ContactController`.

Next let's add a method called `getContacts` to this class. Make this method both public and static. Because it’s a static method, you don't need to create an instance of the class to access the method—you can just use the name of the class followed by a dot (`.`) and the name of the method. This method queries a set of fields on the contact object. Paste this code into `ContactController.cls`:


```
public with sharing class ContactController {
@AuraEnabled(cacheable=true)
public static List<Contact> getContacts() {
return [
SELECT
Id,
Name,
Email,
Phone
FROM Contact
WITH SECURITY_ENFORCED
SELECT
Id,
Name,
Email,
Phone
FROM Contact
WITH SECURITY_ENFORCED
LIMIT 10
];
}
}
```

Next, add the LWC component that displays queried fields.

### Create an LWC Component that Displays Contact Information

1. From the Command Palette, run **SFDX: Create Lightning Web Component** and create a component called `contactList` in the default location.
2. In the `contactList.html` file, cut and paste the following code, then save the file:

Expand All @@ -58,6 +61,7 @@ Next, add the LWC component that displays queried fields.
</template>
```

3. In the `contactList.js` file, cut and paste this code and save:

```
Expand All @@ -68,8 +72,9 @@ export default class ContactList extends LightningElement {
@wire(getContacts) contacts;
}
```

4. Cut and paste the following code in the `contactList.js-meta.xml` file and save:

```
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
Expand All @@ -80,21 +85,23 @@ export default class ContactList extends LightningElement {
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>
```

5. Right-click the default folder under `force-app/main` and run **SFDX: Deploy Source to Org** to deploy your code to the org.

### Add the New Component to Your App in Lightning Experience

1. In Visual Studio Code, open the Command Palette and run **SFDX: Open Default Org**.
This opens your org in a separate browser.
2. From the **App Launcher** find and select **Sales**.
3. Click **Setup** gear then select **Edit Page**.
4. Drag the `contactList` Lightning web component from the Custom area of the Lightning Components list to the top of the Page Canvas.
4. Drag the `contactList` Lightning web component from the Custom area of the Lightning Components list to the top of the Page Canvas.
5. Click **Save**.
6. Click **Activate**.
7. Click **Assign as Org Default**.
8. Click **Save**.
9. Click **Save** again, then click **Back** arrow to return to the page.
10. Refresh the page to view your new component.

![PNG showing LWC component](../../images/../../images/contact_lwc.png)
![PNG showing LWC component](./images/contact_lwc.png)
6 changes: 3 additions & 3 deletions docs/_articles/en/sf-dev-env/org-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Use the Org Browser to view the available metadata types and their corresponding

## Org Browser Overview

![Org Browser Overview](../../../images/org_browser_overview.png)
![Org Browser Overview](./images/org_browser_overview.png)

1. Open Org Browser
2. Refresh available metadata types in the org
Expand Down Expand Up @@ -46,7 +46,7 @@ You can refresh metadata at org level, for a type, for folders in a type, and fo
- Folder metadata type to update the folders in the type, but not the components in the folder
- Folder in a metadata type to refresh the components in it

![Metadata type with folders](../../../images/org_browser_folder_ret.png)
![Metadata type with folders](./images/org_browser_folder_ret.png)

## Retrieve Org Metadata

Expand All @@ -61,7 +61,7 @@ Currently, the source is retrieved into your default package directory as define

You can also retrieve multiple components from the default org by clicking the retrieve button next to the metadata type. If retrieving a component overwrites it, you're prompted to select how to proceed.

![Overwrite components](../../../images/overwrite-prompt.png)
![Overwrite components](./images/overwrite-prompt.png)

When you retrieve components for a metadata type, the Org Browser automatically refreshes the component list for the selected type and then retrieves them. This action ensures that the extensions accurately check the local workspace for existing components.

Expand Down
6 changes: 3 additions & 3 deletions docs/_articles/en/sf-dev-env/vscode-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ The Command Palette provides access to many commands for Salesforce development.

To run a command from Salesforce Extensions for VS Code, press Ctrl+Shift+P (Windows or Linux) or ⇧⌘P (macOS) and type **SFDX** in the command palette to see commands relevant to Salesforce development.

![Command palette, filtered to show SFDX commands](../../../images/sfdx_commands.png)
![Command palette, filtered to show SFDX commands](./images/sfdx_commands.png)

When a command finishes running (due to success, failure, or cancellation), a notification displays at the top of the window.
![Notification that deleted and expired orgs were successfully removed](../../../images/command_success_notification.png)
![Notification that deleted and expired orgs were successfully removed](./images/command_success_notification.png)

To see the output of the commands that you run, select **View** > **Output**, and then select **Salesforce CLI** from the dropdown menu. Alternatively, click **Show** in the completion notification.

![Output view, showing the results of an Apex test run](../../../images/output_view.png)
![Output view, showing the results of an Apex test run](./images/output_view.png)

To clear the output content between SFDX commands, select **Settings** > **User Settings** > **Salesforce Core Configuration** and check **Clear Output Tab**.
17 changes: 8 additions & 9 deletions docs/_articles/en/soql/soql-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,30 @@ title: SOQL Tasks
lang: en
---

This is a repository of sample tasks using SOQL that you can complete in Code Builder or VS Code using the Salesforce Extensions. We’ll keep adding to this list, so make sure you visit this topic often.

This is a repository of sample tasks using SOQL that you can complete in Code Builder or VS Code using the Salesforce Extensions. We’ll keep adding to this list, so make sure you visit this topic often.

## Use the SOQL Query Editor Create a Query To List Accounts with a New York State Address

1. From the Command Palette, run **SFDX: Create Query in SOQL Builder** to open SOQL Query Builder.
2. Click **File > Save** to save the query. Make sure to retain the `.soql` file extension.
3. Click the **Switch Between SOQL Builder and Text Editors** icon (<img src="../../../images/go-to-file.svg">) to reopen the SOQL Query Builder.
3. Click the **Switch Between SOQL Builder and Text Editors** icon (<img src="./images/go-to-file.svg">) to reopen the SOQL Query Builder.
4. In the `From` field, search for the object, and then select the `Account` object.
5. In `Fields`, select `Name`, `BillingState`, and `BillingCountry`.
6. In the `Filter` field, select `AND`, and set:
`BillingCountry = USA`
`AND`
`BillingState = NY`
7. Click **Run Query**.
`BillingCountry = USA`
`AND`
`BillingState = NY`
7. Click **Run Query**.

A Query Result tab pops up. You can then save the result in `csv` or `json` formats.


## Resources

Guides:

- [Example SELECT Clauses](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_examples.htm)
- [Salesforce Object Query Language (SOQL)](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm)

Trailhead:

- [Write SOQL Queries](https://trailhead.salesforce.com/content/learn/modules/apex_database/apex_database_soql)
- [Write SOQL Queries](https://trailhead.salesforce.com/content/learn/modules/apex_database/apex_database_soql)
Loading

0 comments on commit babef4f

Please sign in to comment.