Skip to content

Commit c8623db

Browse files
committed
ran prettier on all metadata
1 parent 34c30c5 commit c8623db

File tree

414 files changed

+6340
-4101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

414 files changed

+6340
-4101
lines changed

README.md

+9-11
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,21 @@ Repo for Salesforce communities som blir brukt i sammenheng med PO Arbeidsgiver.
1111

1212
Pakken er avhengig av følgende pakker:
1313

14-
* [crm-platform-base](https://github.com/navikt/crm-platform-base) (internal)
15-
* [crm-platform-access-control](https://github.com/navikt/crm-platform-access-control) (internal)
16-
* [crm-community-base](https://github.com/navikt/crm-community-base) (internal)
17-
* [crm-arbeidsgiver-base](https://github.com/navikt/crm-arbeidsgiver-base)
18-
19-
14+
- [crm-platform-base](https://github.com/navikt/crm-platform-base) (internal)
15+
- [crm-platform-access-control](https://github.com/navikt/crm-platform-access-control) (internal)
16+
- [crm-community-base](https://github.com/navikt/crm-community-base) (internal)
17+
- [crm-arbeidsgiver-base](https://github.com/navikt/crm-arbeidsgiver-base)
2018

2119
## Komme i gang
2220

2321
1. Salesforce DX-bruker. Kontakt #crm-plattform-team på Slack om du ikke har dette
2422
2. Installer Salesforce DX CLI (SFDX)
25-
- Last ned fra [Salesforce.com](https://developer.salesforce.com/tools/sfdxcli)
23+
- Last ned fra [Salesforce.com](https://developer.salesforce.com/tools/sfdxcli)
2624
- Eller benytt npm: `npm install sfdx-cli --global`
2725
3. Klon dette repoet ([GitHub Desktop](https://desktop.github.com) anbefales for ikke-utviklere)
2826
4. Installer [SSDX](https://github.com/navikt/ssdx)
2927
- Med SSDX kan du lage scratch orger og gjøre deklarative endringer (gjøre endringer i nettleseren på Salesforce, altså ikke-utvikling)
30-
- **Trenger du ikke verktøy utvikling kan du stoppe her**
28+
- **Trenger du ikke verktøy utvikling kan du stoppe her**
3129
5. Installer [VS Code](https://code.visualstudio.com) (anbefalt)
3230
6. Installer [Salesforce Extension Pack](https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode)
3331
7. Installer [AdoptOpenJDK](https://adoptopenjdk.net) (kun versjon 8 eller 11)
@@ -42,9 +40,9 @@ Utvikling foregår i hovedsak på to fronter, i nettleseren i din scratch org og
4240

4341
Ved å bruke VS Code som IDE, er det lagt inn konfigurasjon som automatisk pusher endringer av metadata til din scratch org ved lagring. For å pulle endringer fra kan man enten bruke Salesforce DX CLI til å pulle, men også pushe om man ikke ønsker automatisk push. Se under for kommandoer. Man kan også bruke hjelpeverktøyet SSDX (nevnt over) for å pushe, pulle, åpne scratch org-er, slette gamle, blant annet.
4442

45-
* `sfdx force:org:open` for å åpne instansen(salesforce applikasjonen din).
46-
* `sfdx force:source:pull` for å hente endringer som du gjør i konfigurasjon i applikasjonen online.
47-
* `sfdx force:source:push` for å publisere endringer du gjør i kode lokalt til applikasjonen online.
43+
- `sfdx force:org:open` for å åpne instansen(salesforce applikasjonen din).
44+
- `sfdx force:source:pull` for å hente endringer som du gjør i konfigurasjon i applikasjonen online.
45+
- `sfdx force:source:push` for å publisere endringer du gjør i kode lokalt til applikasjonen online.
4846

4947
## Annet
5048

config/project-scratch-def.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@
4747
"enableMiddleName": true
4848
}
4949
}
50-
}
50+
}

config/ssdx-config.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@
66
"unpackagable": "",
77
"package-key": ".ssdx/.packageKey"
88
},
9-
"permsets_to_assign": [
10-
"Course_Admin",
11-
"EmailSchedulingApp_Admin"
12-
]
13-
}
9+
"permsets_to_assign": ["Course_Admin", "EmailSchedulingApp_Admin"]
10+
}

config/users/user.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
"EmailEncodingKey": "UTF-8",
77
"LanguageLocaleKey": "en_US",
88
"profileName": "Standard User",
9-
"permsets": [
10-
"Course_Admin"
11-
],
9+
"permsets": ["Course_Admin"],
1210
"generatePassword": true
13-
}
11+
}

dummy-data/README.md

+58-64
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# How to use dummy data with SFDX
22

33
## Exporting with record types
4+
45
Always add `RecordType.DeveloperName` to your SOQL query when exporting, if you want to keep the record type intact. A plugin is fixing the record type ID before it is imported to the new scratch org, so you won't have to do a single thing.
56

67
## Exporting data from an org
@@ -15,34 +16,29 @@ Use a name for the feature this data is suitable for, OR the name of the object.
1516

1617
Sometimes, you'll need to export from the child with numerous parents (many lookups).
1718

18-
* For the child records
19-
* `sfdx force:data:tree:export --query "SELECT [fields] FROM [child sObject]" --outputdir dummy-data/[name] --plan`
20-
* For the parents
21-
* `sfdx force:data:tree:export --query "SELECT [fields] FROM [parent sObject 1]" --outputdir dummy-data/[name]` (remove --plan)
22-
* `sfdx force:data:tree:export --query "SELECT [fields] FROM [parent sObject 2]" --outputdir dummy-data/[name]` (remove --plan)
23-
* `sfdx force:data:tree:export --query "SELECT [fields] FROM [parent sObject 3]" --outputdir dummy-data/[name]` (remove --plan)
24-
25-
You'll then ***rename*** `dummy-data/[name]/[Child sObject]s-plan.json` to __ONLY be plan.json__ (in the same folder). Then edit the file, and make sure each json file containing data is present in the plan. The plan.json file is the plan for what is imported.
19+
- For the child records
20+
- `sfdx force:data:tree:export --query "SELECT [fields] FROM [child sObject]" --outputdir dummy-data/[name] --plan`
21+
- For the parents
22+
- `sfdx force:data:tree:export --query "SELECT [fields] FROM [parent sObject 1]" --outputdir dummy-data/[name]` (remove --plan)
23+
- `sfdx force:data:tree:export --query "SELECT [fields] FROM [parent sObject 2]" --outputdir dummy-data/[name]` (remove --plan)
24+
- `sfdx force:data:tree:export --query "SELECT [fields] FROM [parent sObject 3]" --outputdir dummy-data/[name]` (remove --plan)
2625

26+
You'll then **_rename_** `dummy-data/[name]/[Child sObject]s-plan.json` to **ONLY be plan.json** (in the same folder). Then edit the file, and make sure each json file containing data is present in the plan. The plan.json file is the plan for what is imported.
2727

2828
```json
2929
[
30-
{
31-
"sobject": "[Parent sObject]",
32-
"saveRefs": true,
33-
"resolveRefs": false,
34-
"files": [
35-
"[Parent sObject]s.json"
36-
]
37-
},
38-
{
39-
"sobject": "[Child sObject]",
40-
"saveRefs": false,
41-
"resolveRefs": true,
42-
"files": [
43-
"[Child sObject]s.json"
44-
]
45-
}
30+
{
31+
"sobject": "[Parent sObject]",
32+
"saveRefs": true,
33+
"resolveRefs": false,
34+
"files": ["[Parent sObject]s.json"]
35+
},
36+
{
37+
"sobject": "[Child sObject]",
38+
"saveRefs": false,
39+
"resolveRefs": true,
40+
"files": ["[Child sObject]s.json"]
41+
}
4642
]
4743
```
4844

@@ -54,66 +50,64 @@ Example `myFeature-plan.json`:
5450

5551
```json
5652
[
57-
{
58-
"sobject": "Account",
59-
"saveRefs": true,
60-
"resolveRefs": false,
61-
"files": [
62-
"myFeature-Accounts.json"
63-
]
64-
},
65-
{
66-
"sobject": "Case",
67-
"saveRefs": false,
68-
"resolveRefs": true,
69-
"files": [
70-
"myFeature-Cases.json"
71-
]
72-
}
53+
{
54+
"sobject": "Account",
55+
"saveRefs": true,
56+
"resolveRefs": false,
57+
"files": ["myFeature-Accounts.json"]
58+
},
59+
{
60+
"sobject": "Case",
61+
"saveRefs": false,
62+
"resolveRefs": true,
63+
"files": ["myFeature-Cases.json"]
64+
}
7365
]
7466
```
7567

7668
Example `myFeature-Accounts.json`:
7769

7870
```json
7971
{
80-
"records": [
81-
{
82-
"attributes": {
83-
"type": "Account",
84-
"referenceId": "AccountRef1"
85-
},
86-
"BillingState": "Wyoming",
87-
"ShippingState": "Wyoming",
88-
"BillingCity": "Cheyenne",
89-
"ShippingCity": "Cheyenne",
90-
"Name": "Yadel"
91-
},
92-
]
72+
"records": [
73+
{
74+
"attributes": {
75+
"type": "Account",
76+
"referenceId": "AccountRef1"
77+
},
78+
"BillingState": "Wyoming",
79+
"ShippingState": "Wyoming",
80+
"BillingCity": "Cheyenne",
81+
"ShippingCity": "Cheyenne",
82+
"Name": "Yadel"
83+
}
84+
]
9385
}
9486
```
9587

9688
Example `myFeature-Cases.json`:
9789

9890
```json
9991
{
100-
"records": [
101-
{
102-
"attributes": {
103-
"type": "Case",
104-
"referenceId": "CaseRef1"
105-
},
106-
"Account": "@AccountRef1",
107-
"Name": "My first case"
108-
},
109-
]
92+
"records": [
93+
{
94+
"attributes": {
95+
"type": "Case",
96+
"referenceId": "CaseRef1"
97+
},
98+
"Account": "@AccountRef1",
99+
"Name": "My first case"
100+
}
101+
]
110102
}
111103
```
112104

113105
## File and folder structure
106+
114107
**ALWAYS** have dummy-data self-contained in its own folder, both for readability and avoiding overwriting existing data. If you want ALL scratch orgs to have your dummy data, add the data as `dummy-data/[name]/`, which contains ONE `plan.json` file and one or more `[sObjects].json` files, which are also referenced in the plan.sjon.
115108

116109
The init scripts for scratch org creation automatically find these `plan.sjon` files and imports them for you. If you don't want auto importing, have the `plan.sjon` file renamed to anything else, and it won't be imported.
117110

118111
## Importing dummy data
119-
All data is automatically imported using the init scripts for macOS or Windows, as long as they follow the folder structures defined above. See `./scripts/mac/createScratchOrg.command` and `./scripts/windows/createScratchOrg.sh`.
112+
113+
All data is automatically imported using the init scripts for macOS or Windows, as long as they follow the folder structures defined above. See `./scripts/mac/createScratchOrg.command` and `./scripts/windows/createScratchOrg.sh`.

dummy-data/courses/Accounts.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
"Name": "Min bedrift"
99
}
1010
]
11-
}
11+
}

dummy-data/courses/Contacts.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@
3434
"AccountId": "@AccountRef1"
3535
}
3636
]
37-
}
37+
}

dummy-data/courses/CourseRegistrations_con1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,4 +451,4 @@
451451
"Status__c": "Påmeldt"
452452
}
453453
]
454-
}
454+
}

dummy-data/courses/CourseRegistrations_con2.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,4 +451,4 @@
451451
"Status__c": "Påmeldt"
452452
}
453453
]
454-
}
454+
}

dummy-data/courses/CourseRegistrations_con3.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,4 +451,4 @@
451451
"Status__c": "Påmeldt"
452452
}
453453
]
454-
}
454+
}

dummy-data/courses/Courses.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -951,4 +951,4 @@
951951
"Theme__c": "Inkluderende arbeidsliv (IA)"
952952
}
953953
]
954-
}
954+
}

dummy-data/courses/EmailQueue_error.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -701,4 +701,4 @@
701701
"Error__c": "malformed id"
702702
}
703703
]
704-
}
704+
}

dummy-data/courses/EmailQueue_queued.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,4 +601,4 @@
601601
"WhatId__c": "@Course__cRef50"
602602
}
603603
]
604-
}
604+
}

dummy-data/courses/EmailQueue_sent.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,4 +601,4 @@
601601
"WhatId__c": "@Course__cRef50"
602602
}
603603
]
604-
}
604+
}

dummy-data/courses/EmailTemplates.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
"HtmlValue": "<html><head></head><body><p>Hei {{{Recipient.Name}}}! Du er kul!</p></body></html> "
2828
}
2929
]
30-
}
30+
}

dummy-data/courses/plan.json

+5-13
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,19 @@
33
"sobject": "Account",
44
"saveRefs": true,
55
"resolveRefs": false,
6-
"files": [
7-
"Accounts.json"
8-
]
6+
"files": ["Accounts.json"]
97
},
108
{
119
"sobject": "Course__c",
1210
"saveRefs": true,
1311
"resolveRefs": false,
14-
"files": [
15-
"Courses.json"
16-
]
12+
"files": ["Courses.json"]
1713
},
1814
{
1915
"sobject": "Contact",
2016
"saveRefs": true,
2117
"resolveRefs": true,
22-
"files": [
23-
"Contacts.json"
24-
]
18+
"files": ["Contacts.json"]
2519
},
2620
{
2721
"sobject": "CourseRegistration__c",
@@ -37,9 +31,7 @@
3731
"sobject": "EmailTemplate",
3832
"saveRefs": true,
3933
"resolveRefs": false,
40-
"files": [
41-
"EmailTemplates.json"
42-
]
34+
"files": ["EmailTemplates.json"]
4335
},
4436
{
4537
"sobject": "EmailQueue__c",
@@ -51,4 +43,4 @@
5143
"EmailQueue_queued.json"
5244
]
5345
}
54-
]
46+
]

0 commit comments

Comments
 (0)