Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .a4drules/workflows/new-inds-org.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
Use known or explicit CumulusCI (CCI) plans, flows, and tasks first, and if these are unclear then use the the Salesforce DX MCP server tools next and only fall back to `sf` if the MCP service is unavailable.

<detailed_sequence_of_steps>

# Setup a New Scratch Org - Detailed Sequence of Steps

Perform the steps below independently in the following order.

## 1. Confirm Org Alias

```xml
<ask_followup_question>
<question>Enter the org alias.
<options>["dev", "demo", "beta", "feature"]</options>
</ask_followup_question>
```

## 2. Check for Existing Org

Check if the org already exists and is active.

## 3. Create and Deploy

If the alias exists as a name of a Scratch Org that is NOT EXPIRED and IS ACTIVE or exists as a Connected Org, DO NOT create a new scratch org and skip to the next step.

If the alias exists as a name of a Scratch Org and is EXPIRED or NOT ACTIVE, then create the new scratch org.

## 4. Open in Browser

Open the org in the browser.

## 5. Set as Default

If the org already exists but it is not the default org or the org was just created, then set it as the default org.

</detailed_sequence_of_steps>

<common_commands>

1. When you need to get the list of all configured Salesforce orgs or find out which org is the default or if a scratch org is expired.

```bash
cci org list
```

2. When checking if an org is active, review the output of `cci org list`

The output shows:
- A value with a "+" in the Default column indicates the org is the default.
- A bare integer (e.g., "1") indicates the lifespan in days and the org is not active.
- A fractional value (e.g., "16/30") indicates the org is on day 16 of a 30-day lifespan when it will expire.
- A value with a "+" in the Expired column indicates the org is expired.
- A value in the Domain further reinforces that a scratch org is active and assigned to that domain.

- Explicitly treat bare interger in Days as NOT ACTIVE and require creating or recreating the scratch org.
- Require Domain present to consider a scratch org ACTIVE.
- If alias is default (+) but NOT ACTIVE, still create.

3. Create a new scratch and deploy metadata from the CCI project. This command should not be run if an org is already active as it could cause conflicts. Confirm with user if it should be run.

Running this command takes several minutes to fully execute and the subsequent steps should not be run until this is fully completed.

Based on the alias, a different command should be run.

For `dev` or `feature` use:

```bash
cci flow run dev_org --org <alias>
```

For `demo` use:

```bash
cci flow run config_demo --org <alias>
```

For `beta` use:

```bash
cci flow run install_beta --org <alias>
```


4. Open org in browser

```bash
cci org browser <alias>
```

5. Set org as the default for the project

```bash
cci org default <alias>
```

6. Set a CCI dev hub

```xml
<ask_followup_question>
<question>What is the alias of the dev hub?
</ask_followup_question>
```

```xml
<ask_followup_question>
<question>Should this dev hub always be assigned for the project?
<options>["Yes", "No"]</options>
</ask_followup_question>
```
If the dev hub should always be assigned for the project, append `--project` to the following command when running it.

```bash
cci service default devhub <alias>
```

</common_commands>
3 changes: 0 additions & 3 deletions .forceignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ package.xml
**profile
**/profiles/**
**/settings/**
**/Account/**
**/Contact/**

**/unpackaged/**
**/tsconfig.json

**/*.ts
58 changes: 37 additions & 21 deletions cumulusci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ project:
package:
name: Salesforce-Indicators
namespace: inds
api_version: '55.0'
api_version: '65.0'
git:
default_branch: 'master'
default_branch: 'main'
test:
name_match: '%Tests'
source_format: sfdx
Expand All @@ -16,8 +16,7 @@ orgs:
dev:
config_file: orgs/dev.json
days: 30
namespaced: True
scratch:
namespaced: false
demo:
config_file: orgs/demo.json
days: 15
Expand Down Expand Up @@ -45,15 +44,23 @@ tasks:
group: Salesforce Metadata
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/sample_AccountContact
path: unpackaged/config/sample_AccountContact/Part_1

deploy_sample_indicators_layouts:
description: Deploys - Sample Indicators Layouts
name: Deploy Page Layouts for Sample Indicators
group: Salesforce Metadata
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/sample_AccountContact_FlexiPages
path: unpackaged/config/sample_AccountContact/Part_2

deploy_sample_indicators_objects:
description: Deploys - Sample Indicators Assigning Layouts to Objects
name: Deploy Page Layouts for Sample Indicators
group: Salesforce Metadata
class_path: cumulusci.tasks.salesforce.Deploy
options:
path: unpackaged/config/sample_AccountContact/Part_3

deploy_training_indicators:
description: Deploys - Example Indicators used for Training
Expand All @@ -80,16 +87,17 @@ tasks:
flows:
sample_inds:
steps:
1:
task: deploy_sample_indicators
ui_options:
is_required: False
is_recommended: False
2:
task: deploy_sample_indicators_layouts
ui_options:
is_required: False
is_recommended: False
1:
task: deploy_sample_indicators
ui_options:
is_required: False
is_recommended: False
2:
task: deploy_sample_indicators_layouts
ui_options:
is_required: False
is_recommended: False

customer_org:
steps:
1:
Expand All @@ -103,21 +111,29 @@ flows:
ui_options:
is_required: False
is_recommended: False

config_dev:
steps:
3:
task: generate_accounts_and_contacts
4:
flow: sample_inds
3:
task: generate_accounts_and_contacts
4:
flow: sample_inds
5:
task: deploy_sample_indicators_objects

config_demo:
steps:
1:
flow: install_prod
2:
flow: sample_inds
3:
task: deploy_training_indicators
task: deploy_sample_indicators_objects
4:
task: deploy_sample_indicators_layouts
5:
task: deploy_training_indicators
6:
task: generate_accounts_and_contacts

plans:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
<template></template>
<template>
<div>&nbsp;</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</targets>
<targetConfigs>
<targetConfig targets="lightning__RecordPage">
<property name="bundleName" type="String" label="Indicator Bundle" datasource="apex://inds.IndicatorListBundleSelector" description="Choose the Indicator Bundle."/>
<property name="bundleName" type="String" label="Indicator Bundle" datasource="apex://%%%NAMESPACE_DOT%%%IndicatorListBundleSelector" description="Choose the Indicator Bundle."/>
<property name="titleStyle" type="String" label="Title Style" placeholder="Lightning Card" datasource="Lightning Card,Dynamic Forms" description="Choose the Title Style: Standard Lightning Card or a style to match Dynamic Forms."/>
<property name="showTitle" type="Boolean" default="true" label="Display Title" description="Display the Indicator's Title on the component."/>
<property name="showDescription" type="Boolean" default="true" label="Display Description" description="Display the Indicator's Description on the component."/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@
<name>showDescription</name>
<value>true</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showFooter</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showRefresh</name>
<value>true</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@
<name>showDescription</name>
<value>true</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showFooter</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showRefresh</name>
<value>true</value>
Expand All @@ -221,6 +225,48 @@
<identifier>%%%NAMESPACE_OR_C%%%_indicatorBundle</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
<name>bundleName</name>
<value>Account_Company_Info</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>indsShape</name>
<value>circle</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>indsSize</name>
<value>medium</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>mappedField</name>
<value>AccountId</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showDescription</name>
<value>true</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showFooter</name>
<value>true</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showRefresh</name>
<value>false</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>showTitle</name>
<value>true</value>
</componentInstanceProperties>
<componentInstanceProperties>
<name>titleStyle</name>
<value>Lightning Card</value>
</componentInstanceProperties>
<componentName>%%%NAMESPACE_OR_C%%%:indicatorBundle</componentName>
<identifier>%%%NAMESPACE_OR_C%%%_indicatorBundle2</identifier>
</componentInstance>
</itemInstances>
<itemInstances>
<componentInstance>
<componentInstanceProperties>
Expand Down
Loading