From 96d315afd67996f9ac20bd54c31574ca2ec0e6ed Mon Sep 17 00:00:00 2001 From: Sonal Budhiraja <57969266+sbudhirajadoc@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:31:32 -0700 Subject: [PATCH 1/2] docs: update relative links to images folder --- docs/_articles/en/apex/language-server.md | 5 +- docs/_articles/en/bugs-and-feedback.md | 10 +- docs/_articles/en/codebuilder/cb-start.md | 2 +- .../en/deploy-changes/detect-conflicts.md | 7 +- .../en/deploy-changes/metadata-operations.md | 2 +- docs/_articles/en/einstein/einstein-apex.md | 7 +- docs/_articles/en/einstein/einstein-setup.md | 6 +- docs/_articles/en/functions/overview.md | 17 ++- docs/_articles/en/lwc/lwc-get-started.md | 31 +++--- docs/_articles/en/sf-dev-env/org-browser.md | 6 +- .../en/sf-dev-env/vscode-commands.md | 6 +- docs/_articles/en/soql/soql-tasks.md | 17 ++- .../en/vscode-desktop/desktop-intro.md | 6 +- .../_articles/en/vscode-desktop/java-setup.md | 2 +- docs/_articles/ja/codebuilder/about.md | 19 ++-- docs/_articles/ja/codebuilder/cb-setup.md | 17 ++- docs/_articles/ja/codebuilder/cb-start.md | 102 ++++++++++-------- docs/_articles/ja/einstein/einstein-apex.md | 2 +- docs/_articles/ja/einstein/einstein-setup.md | 4 +- docs/_articles/ja/functions/overview.md | 18 +++- docs/_articles/ja/soql/soql-tasks.md | 14 ++- 21 files changed, 171 insertions(+), 129 deletions(-) diff --git a/docs/_articles/en/apex/language-server.md b/docs/_articles/en/apex/language-server.md index b8abba93bd..961a624971 100644 --- a/docs/_articles/en/apex/language-server.md +++ b/docs/_articles/en/apex/language-server.md @@ -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 @@ -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/` directory and restart VS Code. + ## See Also - [Language Server Protocol Specification](https://github.com/Microsoft/language-server-protocol) diff --git a/docs/_articles/en/bugs-and-feedback.md b/docs/_articles/en/bugs-and-feedback.md index 2d3982b29c..1bc95ff4a7 100644 --- a/docs/_articles/en/bugs-and-feedback.md +++ b/docs/_articles/en/bugs-and-feedback.md @@ -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. \ No newline at end of file +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. diff --git a/docs/_articles/en/codebuilder/cb-start.md b/docs/_articles/en/codebuilder/cb-start.md index 2d24ef2fa4..ce68ebd68f 100644 --- a/docs/_articles/en/codebuilder/cb-start.md +++ b/docs/_articles/en/codebuilder/cb-start.md @@ -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) diff --git a/docs/_articles/en/deploy-changes/detect-conflicts.md b/docs/_articles/en/deploy-changes/detect-conflicts.md index b50ac2873b..e87f28b439 100644 --- a/docs/_articles/en/deploy-changes/detect-conflicts.md +++ b/docs/_articles/en/deploy-changes/detect-conflicts.md @@ -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. @@ -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) diff --git a/docs/_articles/en/deploy-changes/metadata-operations.md b/docs/_articles/en/deploy-changes/metadata-operations.md index 2be69a8cb4..2b9e765763 100644 --- a/docs/_articles/en/deploy-changes/metadata-operations.md +++ b/docs/_articles/en/deploy-changes/metadata-operations.md @@ -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. diff --git a/docs/_articles/en/einstein/einstein-apex.md b/docs/_articles/en/einstein/einstein-apex.md index d155d4003f..a6fcdb69ae 100644 --- a/docs/_articles/en/einstein/einstein-apex.md +++ b/docs/_articles/en/einstein/einstein-apex.md @@ -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). diff --git a/docs/_articles/en/einstein/einstein-setup.md b/docs/_articles/en/einstein/einstein-setup.md index 11df17104f..6447bda32f 100644 --- a/docs/_articles/en/einstein/einstein-setup.md +++ b/docs/_articles/en/einstein/einstein-setup.md @@ -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. @@ -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 @@ -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) diff --git a/docs/_articles/en/functions/overview.md b/docs/_articles/en/functions/overview.md index 5c8dd75dae..a52776bf70 100644 --- a/docs/_articles/en/functions/overview.md +++ b/docs/_articles/en/functions/overview.md @@ -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). diff --git a/docs/_articles/en/lwc/lwc-get-started.md b/docs/_articles/en/lwc/lwc-get-started.md index 843bb296a1..4ea321c437 100644 --- a/docs/_articles/en/lwc/lwc-get-started.md +++ b/docs/_articles/en/lwc/lwc-get-started.md @@ -4,11 +4,13 @@ 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. @@ -16,28 +18,29 @@ Before you start, install [Salesforce Extensions for Desktop](./en/vscode-deskto 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 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: @@ -58,6 +61,7 @@ Next, add the LWC component that displays queried fields. ``` + 3. In the `contactList.js` file, cut and paste this code and save: ``` @@ -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: - + ``` @@ -80,16 +85,18 @@ export default class ContactList extends LightningElement { lightning__HomePage - + ``` + 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**. @@ -97,4 +104,4 @@ export default class ContactList extends LightningElement { 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) diff --git a/docs/_articles/en/sf-dev-env/org-browser.md b/docs/_articles/en/sf-dev-env/org-browser.md index 587b869ced..24a6cf82fb 100644 --- a/docs/_articles/en/sf-dev-env/org-browser.md +++ b/docs/_articles/en/sf-dev-env/org-browser.md @@ -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 @@ -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 @@ -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. diff --git a/docs/_articles/en/sf-dev-env/vscode-commands.md b/docs/_articles/en/sf-dev-env/vscode-commands.md index 61f81fd48c..d6833712e6 100644 --- a/docs/_articles/en/sf-dev-env/vscode-commands.md +++ b/docs/_articles/en/sf-dev-env/vscode-commands.md @@ -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**. diff --git a/docs/_articles/en/soql/soql-tasks.md b/docs/_articles/en/soql/soql-tasks.md index 2e5a2202eb..49dc866a39 100644 --- a/docs/_articles/en/soql/soql-tasks.md +++ b/docs/_articles/en/soql/soql-tasks.md @@ -3,26 +3,25 @@ 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 () to reopen the SOQL Query Builder. +3. Click the **Switch Between SOQL Builder and Text Editors** icon () 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) @@ -30,4 +29,4 @@ Guides: 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) diff --git a/docs/_articles/en/vscode-desktop/desktop-intro.md b/docs/_articles/en/vscode-desktop/desktop-intro.md index 30e730e315..182c9324c0 100644 --- a/docs/_articles/en/vscode-desktop/desktop-intro.md +++ b/docs/_articles/en/vscode-desktop/desktop-intro.md @@ -2,9 +2,11 @@ title: Salesforce Extensions for VS Code lang: en --- -Salesforce Extensions for Visual Studio Code are a set of open-source extensions that come with rich tools for developing on the Salesforce platform. Download and install these extensions to start developing on the Salesforce platform. -![GIF showing Apex code completion, pushing source to a scratch org, and running Apex tests](../../../images/overview.gif) +Salesforce Extensions for Visual Studio Code are a set of open-source extensions that come with rich tools for developing on the Salesforce platform. Download and install these extensions to start developing on the Salesforce platform. + +![GIF showing Apex code completion, pushing source to a scratch org, and running Apex tests](./images/overview.gif) + ### Open Source - [Roadmap](https://github.com/forcedotcom/salesforcedx-vscode/wiki/Roadmap) diff --git a/docs/_articles/en/vscode-desktop/java-setup.md b/docs/_articles/en/vscode-desktop/java-setup.md index e79040dc51..b432434a9b 100644 --- a/docs/_articles/en/vscode-desktop/java-setup.md +++ b/docs/_articles/en/vscode-desktop/java-setup.md @@ -9,7 +9,7 @@ The Apex Language Server, shipped as part of the Salesforce Apex Extension for V 2. Search for `apex`. 3. Change the `salesforcedx-vscode-apex.java.home` setting to the full pathname of your Java Runtime. Do **not** set it to the Java executable itself. Note that this pathname can't point to a location inside your project folder. -![Apex Java Setting](../../../images/apex-java-home-setting.png) +![Apex Java Setting](./images/apex-java-home-setting.png) Below you'll find instructions on how to download and configure different versions of Java. diff --git a/docs/_articles/ja/codebuilder/about.md b/docs/_articles/ja/codebuilder/about.md index 7a8b91ca0e..f9b2597862 100644 --- a/docs/_articles/ja/codebuilder/about.md +++ b/docs/_articles/ja/codebuilder/about.md @@ -2,27 +2,28 @@ title: Code Builder Overview lang: en --- + ## Overview + Salesforce Code Builder is a web-based integrated development environment that has all the power and flexibility of Visual Studio Code, Salesforce Extensions for VS Code, and Salesforce CLI in your web browser. Code Builder provides a modern developer experience for all developers, regardless of expertise level. Code Builder makes it easy for admins and developers alike to work in the cloud without having to worry about downloading software, setup or your machine specs. Code Builder is development environment that can be spun up in seconds, and is custom to your Salesforce org and your specified project. Through Code Builder, access your favorite Salesforce languages and frameworks, such as Apex, SOQL, Visualforce, Aura, and Lightning Web Components. Access rich developer tools such as debuggers for Apex, Linting and so on. You can install Code Builder as a managed package in any supported Salesforce org edition. +![Code Builder Welcome Page](./images/codebuilder_welcome.png) -![Code Builder Welcome Page](../../../images/codebuilder_welcome.png) - - - -> **_NOTE:_** This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at [Agreements and Terms]( https://www.salesforce.com/company/legal/agreements/). +> **_NOTE:_** This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at [Agreements and Terms](https://www.salesforce.com/company/legal/agreements/). ### Important Considerations for Code Builder Beta -* We've capped usage for beta at 20 hours for a maximum of 30 days. -* We highly recommend that you save your work and close the browser tab that is running Code Builder to stop the usage clock when you aren’t using Code Builder. -* Code Builder is in open beta and is available to try on a first-come, first-served basis. Once you join beta, you might be added to a waitlist, and will receive an email when a spot opens up for you. + +- We've capped usage for beta at 20 hours for a maximum of 30 days. +- We highly recommend that you save your work and close the browser tab that is running Code Builder to stop the usage clock when you aren’t using Code Builder. +- Code Builder is in open beta and is available to try on a first-come, first-served basis. Once you join beta, you might be added to a waitlist, and will receive an email when a spot opens up for you. ## Additional Resources - Trailhead: [Code Builder Quick Look](https://trailhead.salesforce.com/content/learn/modules/code-builder-quick-look) - + ## Bugs and Feedback + 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. diff --git a/docs/_articles/ja/codebuilder/cb-setup.md b/docs/_articles/ja/codebuilder/cb-setup.md index 824805f598..9efd20a779 100644 --- a/docs/_articles/ja/codebuilder/cb-setup.md +++ b/docs/_articles/ja/codebuilder/cb-setup.md @@ -7,38 +7,33 @@ lang: en Salesforce Code Builder is a second-generation (2GP) managed package that you can install in any supported Salesforce org edition. -1. Go to App Exchange and search for the Code builder managed package. +1. Go to App Exchange and search for the Code builder managed package. 2. Click **Get It Now**. 3. Select the org in which you want to install Code Builder. 4. Check terms and conditions and click **Confirm and Install**. - -![Install Button](../../../images/install_button.png) +![Install Button](./images/install_button.png) Grant access and click **Continue**. - - -![Grant Access](../../../images/grant_access.png) - - +![Grant Access](./images/grant_access.png) Click **Done**. - ## Assign Permissions + As an admin, assign user permissions: 1. From Setup, enter `Permission Sets` in the Quick Find box, then select **Permission Sets**. 2. Click **CodeBuilder**. -3. Click **Manage Assignments** +3. Click **Manage Assignments** 4. Click **Add Assignments**. 5. Select the checkboxes next to the names of the users you want assigned to the permission set, and click **Assign**. - Your users can now go to the App Launcher and launch **Code Builder(Beta)**. ## See Also + [Install a Package](https://help.salesforce.com/s/articleView?id=sf.distribution_installing_packages.htm&type=5) [Assign a Permission Set to Multiple Users](https://help.salesforce.com/s/articleView?id=sf.perm_sets_mass_assign.htm&type=5) diff --git a/docs/_articles/ja/codebuilder/cb-start.md b/docs/_articles/ja/codebuilder/cb-start.md index 51ab35e9fc..67668b4531 100644 --- a/docs/_articles/ja/codebuilder/cb-start.md +++ b/docs/_articles/ja/codebuilder/cb-start.md @@ -4,24 +4,30 @@ lang: en --- ## Overview + Complete this Quick Start to become familiar with the Code Builder interface and perform some simple tasks in your Code Builder environment. + ## Important Considerations for Code Builder Beta + We've capped usage for beta at 20 hours for a maximum of 30 days. We highly recommend that you save your work and close the browser tab that is running Code Builder to stop the usage clock when you aren’t using it. ### Don’t Forget to Save Your Work -Working in the cloud has its advantages. However, unlike working on a desktop where you save your files to a local machine, you must either deploy your changes to your org, or commit them to source control to save your work. Save your work before you close the Code Builder tab on your browser so you don’t lose it. -**Note:** Throughout the beta, Code Builder environments could be deleted. All beta environments will be removed before GA. +Working in the cloud has its advantages. However, unlike working on a desktop where you save your files to a local machine, you must either deploy your changes to your org, or commit them to source control to save your work. Save your work before you close the Code Builder tab on your browser so you don’t lose it. +**Note:** Throughout the beta, Code Builder environments could be deleted. All beta environments will be removed before GA. ## Let’s Get Started + To get started you’ll do the following: + 1. Create a Code Builder environment. 2. Create a Salesforce DX project. 3. Connect to your org by logging in. -Now you’re ready to use Code Builder. + Now you’re ready to use Code Builder. ## Connect to Your Dev Environment + 1. From the App Launcher, find and open **Code Builder**. **Note:** If you don't see Code Builder as an option, or you see an empty screen when you launch it, contact your admin to make sure you have the correct license and permission set assigned to you. @@ -33,17 +39,18 @@ Now you’re ready to use Code Builder. Next, connect an org to your Code Builder environment. You can choose to connect to a Salesforce org or a sandbox org. 1. Log in to your development environment, click **Allow** to grant access, then click **Next**. -2. Choose an alias (nickname) for your org. If you work on many orgs, make sure the nickname helps you identify the org quickly in the future. -Your new Code Builder environment is now available on your dashboard. -3. Click **Launch** to launch Code Builder in a new tab. +2. Choose an alias (nickname) for your org. If you work on many orgs, make sure the nickname helps you identify the org quickly in the future. + Your new Code Builder environment is now available on your dashboard. +3. Click **Launch** to launch Code Builder in a new tab. 4. Now sit back and relax for a few minutes while Code Builder creates and configures your workspace. Code Builder might take a fews minutes to start up when it initially sets up. **Tip**: Once you have created your Code Builder environment, launch it from the dashboard at any time, or bookmark it for fast access. ## Let's Take A Quick Tour + You’re now in your developer environment in Code Builder. Code Builder has VS Code’s rich IDE plus it gives you easy access to cool Salesforce development-specific tools through the Salesforce extension pack. Let’s take a quick tour and get to know the lay of the land. Your screen looks something like this: -![code_builder_ui](../../../images/code_builder_ui.jpg) +![code_builder_ui](./images/code_builder_ui.jpg) The Code Builder user interface is divided into five main areas. **Activity Bar**: Located on the left-hand side, it contains iconic buttons to switch between different views. In our example, the Explorer view is active. @@ -54,68 +61,71 @@ The Code Builder user interface is divided into five main areas. **Panel**: Shows output or debug information, errors and warnings, or an integrated terminal. You can choose the output to display. -**Status Bar**: Shows information about the opened project and the files you’re editing. The Status Bar displays the org that you're connected to. +**Status Bar**: Shows information about the opened project and the files you’re editing. The Status Bar displays the org that you're connected to. ## Get To Know Your Org – Use the Org Browser -Take a closer look at the activity bar and notice a cloud icon. This icon represents the Org Browser. It’s a part of the Salesforce Extension pack. It helps you browse and retrieve metadata from your org without having to use a manifest file. Use the Org Browser to retrieve metadata. -**More Information**: You can find more information about the [Org Browser](https://developer.salesforce.com/tools/vscode/en/user-guide/org-browser) in the Salesforce Extension Pack documentation. +Take a closer look at the activity bar and notice a cloud icon. This icon represents the Org Browser. It’s a part of the Salesforce Extension pack. It helps you browse and retrieve metadata from your org without having to use a manifest file. Use the Org Browser to retrieve metadata. -![org_browser_small](../../../images/org_browser_small.jpg) +**More Information**: You can find more information about the [Org Browser](https://developer.salesforce.com/tools/vscode/en/user-guide/org-browser) in the Salesforce Extension Pack documentation. +![org_browser_small](./images/org_browser_small.jpg) -Click Org Browser and scroll down to **Custom Objects**. The first object you see is Account. You can view the metadata of the **Account** object (and do a few more cool things, but we’ll get to those in a bit). +Click Org Browser and scroll down to **Custom Objects**. The first object you see is Account. You can view the metadata of the **Account** object (and do a few more cool things, but we’ll get to those in a bit). ## Use SOQL Builder to Build and Run your First Query -Code Builder comes preloaded with everything you need to build and run a SOQL query. +Code Builder comes preloaded with everything you need to build and run a SOQL query. Let’s build and run a simple SOQL query on the Account object: -1. Press Ctrl+Shift+P (⇧⌘P) to view the Command Palette. +1. Press Ctrl+Shift+P (⇧⌘P) to view the Command Palette. 2. Type “SOQL” in the search box and then select **SFDX: Create Query in SOQL Builder**. -3. Select the following: +3. Select the following: - a. **Account** Object in **From** field. + a. **Account** Object in **From** field. - b. **BillingState** and **NumberofEmployees** in **Fields**. + b. **BillingState** and **NumberofEmployees** in **Fields**. - c. Press **Run Query** to run this simple SOQL Query on your org. + c. Press **Run Query** to run this simple SOQL Query on your org. + +You’re prompted to save your changes if you close the untitled file. -You’re prompted to save your changes if you close the untitled file. 5. Save the changes to a file using a “.soql” extension. 6. Let’s rerun the saved query – Right click the file and select **Open With…** then select SOQL Builder. -The file opens in SOQL Builder and you can rerun or edit the query as you wish. + The file opens in SOQL Builder and you can rerun or edit the query as you wish. **More Information**: For more information on building complex queries see the [SOQL Builder](https://developer.salesforce.com/tools/vscode/en/soql/soql-builder) in the Salesforce Extensions for Visual Studio Code documentation. ## Connect to a Different Org + During the course of development, you'll use different types of orgs for different stages. For example, it's common to use a Developer sandbox or Development Edition org during the development phase, and move to other sandbox types for integration, testing, and staging. Eventually, you'll deploy your changes to a production org. You can connect Code Builder to any of these orgs to deploy or retrieve metadata. To log into another org: -1. Click the org picker(which show the alias for the current org) in the status bar, to bring up the Command Palette. +1. Click the org picker(which show the alias for the current org) in the status bar, to bring up the Command Palette. 2. From the Command Palette run **SFDX: Authorize an Org**. 3. Enter the login URL or select the org you want to log into. 4. Enter an alias for the org, for example, dev_pro_sandbox or my_playground. 5. A code is displayed in a text box. click **Connect**. -6. Log in with the relevant username and password. Click **Allow**. +6. Log in with the relevant username and password. Click **Allow**. 7. Click **Continue**. You’re now connected to a different org, and its name is visible in the status bar at the bottom. -Once you authorize an org, we take care of future authorizations so you don't have to continually log in. Just click the org’s name and then choose the org from the list. +Once you authorize an org, we take care of future authorizations so you don't have to continually log in. Just click the org’s name and then choose the org from the list. ## Create, Retrieve, and Deploy a Custom Field + Let’s add a custom field to an object in our org and pull its metadata into our Code Builder project. -First let’s add a custom field – +First let’s add a custom field – 1. From **Setup**, go to **Object Manager** | **Account**. 2. Click **Fields & Relationships**. 3. Click **New**. 4. For data type, select **Date**, then click **Next**. 5. Fill out the following: - * Field Label: Created On - * Field Name: createdon - * Description: Date of Account Creation + - Field Label: Created On + - Field Name: createdon + - Description: Date of Account Creation 6. Click **Next** until you save the field. Now let’s retrieve metadata for this new field – @@ -124,9 +134,10 @@ Now let’s retrieve metadata for this new field – 2. Scroll down to **Custom Objects** and navigate to **Account**. 3. Click the retrieve icon next to the Account component to run **SFDX: Retrieve Source from Org**. 4. From the Activity Bar, click the Explorer and navigate to `force-app/main/default/object/Account` -Lo and behold, in the `fields` folder, a file named `createdon_c.field-meta.xml` contains metadata for your new custom field! + Lo and behold, in the `fields` folder, a file named `createdon_c.field-meta.xml` contains metadata for your new custom field! The metadata is here for your reference: + ``` @@ -139,18 +150,20 @@ The metadata is here for your reference: Date ``` + We’ll now make a simple edit to this field and deploy our changes back to our org with a single click. -1. Edit `createdon_c.field-meta.xml` and change the `` tag value to `true` to indicate that this custom field is required. -2. Right click the `objects/Account` folder and click **SFDX: Deploy Source to Org**. -3. After the command has successfully run, go back to your org and check details of the **Created On** custom field and confirm that it’s now a required field. +1. Edit `createdon_c.field-meta.xml` and change the `` tag value to `true` to indicate that this custom field is required. +2. Right click the `objects/Account` folder and click **SFDX: Deploy Source to Org**. +3. After the command has successfully run, go back to your org and check details of the **Created On** custom field and confirm that it’s now a required field. ## Create and Deploy a New Lightning Web Component + For another exercise in deploying, let’s learn how to quickly create a simple Lightning Web Component in our Code Builder project. We’ll then deploy this component to our org using a single command. Here we go: -Let’s create a Lightning Web Component – +Let’s create a Lightning Web Component – -1. Press Ctrl+Shift+P (⇧⌘P) run **SFDX: Create Lightning Web Component** to create a New Lightning Web Component. +1. Press Ctrl+Shift+P (⇧⌘P) run **SFDX: Create Lightning Web Component** to create a New Lightning Web Component. 2. Give the component a name, say, `newCBComponent`. 3. Press **Enter** to accept the default file location (`force-app/main/default/lwc`). 4. Press **Enter**. @@ -167,6 +180,7 @@ Update the files – ``` + 2. In the HTML file, `newCBComponent.js`, copy, and paste the following code: ``` @@ -179,7 +193,9 @@ export default class NewCBComponent extends LightningElement { } } ``` + 3. In the HTML file, `newCBComponent.js-meta.xml`, copy and paste the following code: + ``` @@ -192,34 +208,36 @@ export default class NewCBComponent extends LightningElement { ``` + 4. Save all the files. -Let’s deploy this new component to our org – +Let’s deploy this new component to our org – -1. Right-click the `force-app/main/default/lwc/newCBComponent` folder and click **SFDX: Deploy Source to Org** +1. Right-click the `force-app/main/default/lwc/newCBComponent` folder and click **SFDX: Deploy Source to Org** Your output window shows this message: ``` === Deployed Source -STATE FULL NAME TYPE PROJECT PATH +STATE FULL NAME TYPE PROJECT PATH ─────── ────────────── ──────────────────────── ──────────────────────────────────────────────────────────────────── -Created newCBComponent LightningComponentBundle force-app/main/default/lwc/newCBComponent/newCBComponent.html -Created newCBComponent LightningComponentBundle force-app/main/default/lwc/newCBComponent/newCBComponent.js +Created newCBComponent LightningComponentBundle force-app/main/default/lwc/newCBComponent/newCBComponent.html +Created newCBComponent LightningComponentBundle force-app/main/default/lwc/newCBComponent/newCBComponent.js Created newCBComponent LightningComponentBundle force-app/main/default/lwc/newCBComponent/newCBComponent.js-meta.xml 10:22:27.340 ended SFDX: Deploy Source to Org ``` -2. Select **SFDX: Open Default Org** to log into your org. -3. Navigate to **Setup:Lightning Components** to confirm that a new Lightning Web Component named `newCBComponent` is now available in your org. +2. Select **SFDX: Open Default Org** to log into your org. +3. Navigate to **Setup:Lightning Components** to confirm that a new Lightning Web Component named `newCBComponent` is now available in your org. Congratulations on successfully creating and deploying a new Lightning Web Component. ## To Learn More + You can take your time and use these resources to learn more about what you can do in Code Builder: -* [Visual Studio Code User Interface](https://code.visualstudio.com/docs/getstarted/userinterface) to get to know the Visual Studio code user interface -* [Salesforce Extensions](https://developer.salesforce.com/tools/vscode) to learn about all the powerful features of the Salesforce Extension for VS Code. +- [Visual Studio Code User Interface](https://code.visualstudio.com/docs/getstarted/userinterface) to get to know the Visual Studio code user interface +- [Salesforce Extensions](https://developer.salesforce.com/tools/vscode) to learn about all the powerful features of the Salesforce Extension for VS Code. diff --git a/docs/_articles/ja/einstein/einstein-apex.md b/docs/_articles/ja/einstein/einstein-apex.md index 88933295bb..be486c2560 100644 --- a/docs/_articles/ja/einstein/einstein-apex.md +++ b/docs/_articles/ja/einstein/einstein-apex.md @@ -7,7 +7,7 @@ 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 a receive an Apex code suggestion and press **Ask**. Copy the code suggestion you receive and paste it into an Apex file to use it as a "starter" code. -![Side bar code generation](../../../images/einstein-sidebar.png) +![Side bar code generation](./images/einstein-sidebar.png) ## Generate Apex Code Using a Command Palette Command diff --git a/docs/_articles/ja/einstein/einstein-setup.md b/docs/_articles/ja/einstein/einstein-setup.md index acd5f4e70f..54b38a97be 100644 --- a/docs/_articles/ja/einstein/einstein-setup.md +++ b/docs/_articles/ja/einstein/einstein-setup.md @@ -50,7 +50,7 @@ Then install Einstein for Developers(beta)from the VS Code marketplace. Open a Salesforce DX project in VS Code. A sidebar panel opens and the Einstein logo on the activity bar confirms that the extension is installed. -![einstein installed](../../../images/einstein-sidebar.png) +![einstein installed](./images/einstein-sidebar.png) ## Connect to an Org @@ -85,4 +85,4 @@ For example: 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 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) diff --git a/docs/_articles/ja/functions/overview.md b/docs/_articles/ja/functions/overview.md index 35d28a32b1..713c3e1200 100644 --- a/docs/_articles/ja/functions/overview.md +++ b/docs/_articles/ja/functions/overview.md @@ -2,30 +2,38 @@ title: Overview lang: ja --- + ## 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 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. ### 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). + +For more information see [Get Started with Salesforce Functions](https://developer.salesforce.com/docs/platform/functions/guide/index.html). diff --git a/docs/_articles/ja/soql/soql-tasks.md b/docs/_articles/ja/soql/soql-tasks.md index c0a2bc230c..b2f9d6f319 100644 --- a/docs/_articles/ja/soql/soql-tasks.md +++ b/docs/_articles/ja/soql/soql-tasks.md @@ -5,27 +5,25 @@ lang: en This repository contains sample SOQL tasks that you can complete in Code Builder or VS Code using the Salesforce Extensions. We constantly add to this list, so make sure you visit this topic often. - ## Create a Query That Lists 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 file. Make sure to retain the .soql file extension. -3. Click the Switch Between SOQL Builder and Text Editors icon () to reopen the SOQL Query Builder. +3. Click the Switch Between SOQL Builder and Text Editors icon () to reopen the SOQL Query Builder. 4. In the `From` field, search object, and 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 - [Example SELECT Clauses](https://developer.salesforce.com/docs/atlas.en-us.236.0.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.236.0.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) From dab5687582c8d17b2f28b90995c23304fcea2b3c Mon Sep 17 00:00:00 2001 From: Sonal Budhiraja <57969266+sbudhirajadoc@users.noreply.github.com> Date: Thu, 19 Oct 2023 11:59:57 -0700 Subject: [PATCH 2/2] Update sidebar.yml added "(Beta)" to local development. --- docs/_data/sidebar.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/sidebar.yml b/docs/_data/sidebar.yml index 8920dcc0d9..a4fa044e58 100644 --- a/docs/_data/sidebar.yml +++ b/docs/_data/sidebar.yml @@ -326,8 +326,8 @@ ja: バグとフィードバック url: /bugs-and-feedback - title: - en: Local Development - ja: ローカル開発 + en: Local Development (Beta) + ja: ローカル開発 (Beta) baseUrl: /localdev/ children: - title: