mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-06 15:59:59 +08:00
@W-21749060 fix: update first time site creation instructions
This commit is contained in:
parent
bba4327cd8
commit
f00dff8dfb
@ -18,11 +18,60 @@ Ask user to choose:
|
|||||||
|
|
||||||
### Option 1: Create in Org
|
### Option 1: Create in Org
|
||||||
|
|
||||||
|
**Step 1:** Run the create command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sf community create --name "{siteName}" --template-name 'Build Your Own (LWR)' --url-path-prefix "{prefix}"
|
sf community create --name "{siteName}" --template-name 'Build Your Own (LWR)' --url-path-prefix "{prefix}" --json
|
||||||
```
|
```
|
||||||
|
|
||||||
After creation, retrieve metadata using sf CLI.
|
Site creation is an async job. As soon as the terminal returns output, capture the `jobId` and move on — do not wait for the shell command to fully exit.
|
||||||
|
|
||||||
|
**Step 2:** Ask the user: *"Would you like me to wait for the site creation to complete and then retrieve the metadata for you, or would you prefer to retrieve it yourself once it's ready?"*
|
||||||
|
|
||||||
|
**Stop here and wait for the user's response before proceeding.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**If the user wants to wait and retrieve:**
|
||||||
|
|
||||||
|
Poll the `BackgroundOperation` object using the following command, replacing `{jobId}` with the ID returned from the create command:
|
||||||
|
|
||||||
|
```soql
|
||||||
|
SELECT Status FROM BackgroundOperation WHERE Id = '{jobId}'
|
||||||
|
```
|
||||||
|
|
||||||
|
Use the MCP tool `run_soql_query` to run this query on the given target org. Repeat until `Status` is `Complete`.
|
||||||
|
|
||||||
|
Once complete, run each of the following retrieval commands **one at a time**. Do not chain them together (e.g. do not use `&&`). Wait for each command to return output before running the next:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sf project retrieve start --metadata DigitalExperienceBundle --target-org {usernameOrAlias} --json
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sf project retrieve start --metadata DigitalExperienceConfig --target-org {usernameOrAlias} --json
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sf project retrieve start --metadata Network --target-org {usernameOrAlias} --json
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sf project retrieve start --metadata CustomSite --target-org {usernameOrAlias} --json
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**If the user wants to retrieve themselves:**
|
||||||
|
|
||||||
|
Provide them with the retrieval command to run once the site is ready:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sf project retrieve start --metadata DigitalExperienceBundle DigitalExperienceConfig Network CustomSite --target-org {usernameOrAlias} --json
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
### Option 2: Scaffold Locally
|
### Option 2: Scaffold Locally
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user