Skip to content

Commit

Permalink
Minlopro: Lightning Knowledge Setup (P2) (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomeandrey authored Dec 15, 2024
2 parents 1c27923 + 656e8d3 commit ccffb1d
Show file tree
Hide file tree
Showing 31 changed files with 679 additions and 141 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create_scratch_org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
node-version: '20.x'
- name: 'Install Salesforce CLI & Authorize DevHub Org'
run: |
bash ./scripts/deploy/build.sh
bash ./scripts/deploy/build.sh -a
bash ./scripts/deploy/authorize_org.sh --sfdxUrl "$DEV_HUB_AUTH_URL" --orgAlias "DevHub"
sf config set target-dev-hub=DevHub
- name: 'Spin Up Brand New Scratch Org'
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ manifests/package.xml
npm-debug.log*
yarn-debug.log*
yarn-error.log*
export.json
.env
.env''
**/.env
Expand Down
6 changes: 5 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"plugins": ["prettier-plugin-apex", "@prettier/plugin-xml"],
"plugins": ["prettier-plugin-apex", "@prettier/plugin-xml", "prettier-plugin-sql"],
"trailingComma": "none",
"tabWidth": 4,
"semi": true,
Expand All @@ -17,6 +17,10 @@
{
"files": "*.{cls,trigger}",
"options": { "parser": "apex" }
},
{
"files": "*.soql",
"options": { "parser": "sql" }
}
]
}
9 changes: 5 additions & 4 deletions config/data/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Sample Data
# Seeding Org With Sample Data

Sample data (for `Accounts`, `Contacts`, `Opportunities` and other objects) was generated via [Mockaroo Tool](https://mockaroo.com/).

Refer to bash scripts below in order to export/import sample data:
Use scripts below in order to seed/export/import sample data:

- [`import_sample_data.sh`](../../scripts/util/import_sample_data.sh)
- [`export_sample_data.sh`](../../scripts/util/export_sample_data.sh)
- [`import_sample_data.sh`](../../scripts/util/data-seeding/import_sample_data.sh)
- [`export_sample_data.sh`](../../scripts/util/data-seeding/export_sample_data.sh)
- [`migrate_knowledge_articles.sh`](../../scripts/util/data-seeding/migrate_knowledge_articles.sh)

See [Salesforce Docs](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_test_data_example.htm)
for more.
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,18 @@
"sobject": "Account",
"saveRefs": true,
"resolveRefs": false,
"files": [
"sample-Accounts.json"
]
"files": ["sample-Accounts.json"]
},
{
"sobject": "Contact",
"saveRefs": false,
"resolveRefs": true,
"files": [
"sample-Contacts.json"
]
"files": ["sample-Contacts.json"]
},
{
"sobject": "Opportunity",
"saveRefs": false,
"resolveRefs": true,
"files": [
"sample-Opportunities.json"
]
"files": ["sample-Opportunities.json"]
}
]
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"sobject": "Knowledge__kav",
"saveRefs": true,
"resolveRefs": false,
"files": ["sample-Knowledge__kav.json"]
},
{
"sobject": "Knowledge__DataCategorySelection",
"saveRefs": false,
"resolveRefs": true,
"files": ["sample-Knowledge__DataCategorySelection.json"]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -1051,4 +1051,4 @@
"Website": "https://our-page.com"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1201,4 +1201,4 @@
"AccountId": "@AccountRef50"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
"IsCorporate": true
}
]
}
}
148 changes: 148 additions & 0 deletions config/data/samples/sample-Knowledge__DataCategorySelection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
{
"records": [
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef1"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Development",
"ParentId": "@Knowledge__kavRef1"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef2"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Development",
"ParentId": "@Knowledge__kavRef2"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef3"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Administration",
"ParentId": "@Knowledge__kavRef3"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef4"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Configuration",
"ParentId": "@Knowledge__kavRef3"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef5"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Development",
"ParentId": "@Knowledge__kavRef4"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef6"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Administration",
"ParentId": "@Knowledge__kavRef4"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef7"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Configuration",
"ParentId": "@Knowledge__kavRef4"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef8"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Development",
"ParentId": "@Knowledge__kavRef5"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef9"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Development",
"ParentId": "@Knowledge__kavRef6"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef10"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Administration",
"ParentId": "@Knowledge__kavRef6"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef11"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "CI_CD",
"ParentId": "@Knowledge__kavRef6"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef12"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Development",
"ParentId": "@Knowledge__kavRef7"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef13"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "CI_CD",
"ParentId": "@Knowledge__kavRef7"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef14"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Development",
"ParentId": "@Knowledge__kavRef8"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef15"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "Administration",
"ParentId": "@Knowledge__kavRef8"
},
{
"attributes": {
"type": "Knowledge__DataCategorySelection",
"referenceId": "Knowledge__DataCategorySelectionRef16"
},
"DataCategoryGroupName": "SalesforceFAQs",
"DataCategoryName": "CI_CD",
"ParentId": "@Knowledge__kavRef8"
}
]
}
Loading

0 comments on commit ccffb1d

Please sign in to comment.