@kitalive/sfdx-plugin 0.4.6 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +317 -443
- package/lib/bulk.js +161 -167
- package/lib/bulk.js.map +1 -1
- package/lib/commands/kit/data/bulk/delete.js +45 -38
- package/lib/commands/kit/data/bulk/delete.js.map +1 -1
- package/lib/commands/kit/data/bulk/query.js +25 -23
- package/lib/commands/kit/data/bulk/query.js.map +1 -1
- package/lib/commands/kit/data/bulk/upsert.js +13 -1
- package/lib/commands/kit/data/bulk/upsert.js.map +1 -1
- package/lib/commands/kit/data/csv/convert.js +43 -36
- package/lib/commands/kit/data/csv/convert.js.map +1 -1
- package/lib/commands/kit/layout/assignments/deploy.js +20 -18
- package/lib/commands/kit/layout/assignments/deploy.js.map +1 -1
- package/lib/commands/kit/layout/assignments/retrieve.js +52 -47
- package/lib/commands/kit/layout/assignments/retrieve.js.map +1 -1
- package/lib/commands/kit/object/fields/describe.js +23 -23
- package/lib/commands/kit/object/fields/describe.js.map +1 -1
- package/lib/commands/kit/object/fields/setup.js +69 -65
- package/lib/commands/kit/object/fields/setup.js.map +1 -1
- package/lib/commands/kit/script/execute.js +34 -43
- package/lib/commands/kit/script/execute.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/lib/metadata.js +4 -2
- package/lib/metadata.js.map +1 -1
- package/lib/utils.js +6 -5
- package/lib/utils.js.map +1 -1
- package/messages/data.bulk.delete.md +17 -0
- package/messages/data.bulk.md +54 -0
- package/messages/data.bulk.query.md +17 -0
- package/messages/data.bulk.upsert.md +13 -0
- package/messages/data.csv.convert.md +49 -0
- package/messages/layout.assignments.deploy.md +24 -0
- package/messages/layout.assignments.retrieve.md +46 -0
- package/messages/object.fields.describe.md +25 -0
- package/messages/object.fields.setup.md +29 -0
- package/messages/script.execute.md +42 -0
- package/oclif.manifest.json +1017 -1
- package/package.json +161 -48
- package/lib/bulk.d.ts +0 -22
- package/lib/commands/kit/data/bulk/delete.d.ts +0 -18
- package/lib/commands/kit/data/bulk/insert.d.ts +0 -2
- package/lib/commands/kit/data/bulk/query.d.ts +0 -15
- package/lib/commands/kit/data/bulk/update.d.ts +0 -2
- package/lib/commands/kit/data/bulk/upsert.d.ts +0 -2
- package/lib/commands/kit/data/csv/convert.d.ts +0 -22
- package/lib/commands/kit/layout/assignments/deploy.d.ts +0 -13
- package/lib/commands/kit/layout/assignments/retrieve.d.ts +0 -21
- package/lib/commands/kit/object/fields/describe.d.ts +0 -14
- package/lib/commands/kit/object/fields/setup.d.ts +0 -21
- package/lib/commands/kit/script/execute.d.ts +0 -13
- package/lib/index.d.ts +0 -2
- package/lib/metadata.d.ts +0 -18
- package/lib/types.d.ts +0 -35
- package/lib/utils.d.ts +0 -16
package/README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
@kitalive/sfdx-plugin
|
|
2
|
-
=====================
|
|
1
|
+
# @kitalive/sfdx-plugin
|
|
3
2
|
|
|
4
3
|
[](https://npmjs.org/package/@kitalive/sfdx-plugin)
|
|
5
4
|
[](https://github.com/Kitalive-Inc/sfdx-plugin/blob/main/package.json)
|
|
@@ -7,607 +6,482 @@
|
|
|
7
6
|
## Install
|
|
8
7
|
|
|
9
8
|
```
|
|
10
|
-
|
|
9
|
+
sf plugins install @kitalive/sfdx-plugin
|
|
11
10
|
```
|
|
12
11
|
|
|
13
12
|
## Usage
|
|
14
13
|
|
|
15
14
|
<!-- usage -->
|
|
15
|
+
|
|
16
16
|
```sh-session
|
|
17
17
|
$ npm install -g @kitalive/sfdx-plugin
|
|
18
|
-
$
|
|
18
|
+
$ sf COMMAND
|
|
19
19
|
running command...
|
|
20
|
-
$
|
|
21
|
-
@kitalive/sfdx-plugin/0.
|
|
22
|
-
$
|
|
20
|
+
$ sf (--version)
|
|
21
|
+
@kitalive/sfdx-plugin/0.5.1 darwin-arm64 node-v18.15.0
|
|
22
|
+
$ sf --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
|
-
$
|
|
24
|
+
$ sf COMMAND
|
|
25
25
|
...
|
|
26
26
|
```
|
|
27
|
+
|
|
27
28
|
<!-- usagestop -->
|
|
28
29
|
|
|
29
30
|
## Commands
|
|
30
31
|
|
|
31
32
|
<!-- commands -->
|
|
32
|
-
* [`sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkdelete--q-string---hard---concurrencymode-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
33
|
-
* [`sfdx kit:data:bulk:insert -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkinsert--o-string--f-filepath--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
34
|
-
* [`sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkquery--q-string--f-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
35
|
-
* [`sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkupdate--o-string--f-filepath--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
36
|
-
* [`sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatabulkupsert--o-string--f-filepath--i-string--r-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---setnull---convertonly---concurrencymode-string---assignmentruleid-string--s-integer--w-integer--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
37
|
-
* [`sfdx kit:data:csv:convert [-f <filepath>] [-o <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitdatacsvconvert--f-filepath--o-filepath--e-string--d-string--q-string---skiplines-integer---trim--m-filepath--c-filepath---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
38
|
-
* [`sfdx kit:layout:assignments:deploy -f <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitlayoutassignmentsdeploy--f-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
39
|
-
* [`sfdx kit:layout:assignments:retrieve -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitlayoutassignmentsretrieve--f-string--p-string--o-string---merge--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
40
|
-
* [`sfdx kit:object:fields:describe -o <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitobjectfieldsdescribe--o-string--f-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
41
|
-
* [`sfdx kit:object:fields:setup -o <string> -f <string> [--delete] [--force] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitobjectfieldssetup--o-string--f-string---delete---force--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
42
|
-
* [`sfdx kit:script:execute [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-kitscriptexecute--f-filepath--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
|
|
43
|
-
|
|
44
|
-
## `sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
45
|
-
|
|
46
|
-
bulk delete records by SOQL select query
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
USAGE
|
|
50
|
-
$ sfdx kit:data:bulk:delete -q <string> [--hard] [--concurrencymode <string>] [-s <integer>] [-w <integer>] [-u
|
|
51
|
-
<string>] [--apiversion <string>] [--json] [--loglevel
|
|
52
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
53
|
-
|
|
54
|
-
OPTIONS
|
|
55
|
-
-q, --query=query (required) SOQL query to delete
|
|
56
33
|
|
|
57
|
-
|
|
58
|
-
|
|
34
|
+
- [`sf kit data bulk delete`](#sf-kit-data-bulk-delete)
|
|
35
|
+
- [`sf kit data bulk insert`](#sf-kit-data-bulk-insert)
|
|
36
|
+
- [`sf kit data bulk query`](#sf-kit-data-bulk-query)
|
|
37
|
+
- [`sf kit data bulk update`](#sf-kit-data-bulk-update)
|
|
38
|
+
- [`sf kit data bulk upsert`](#sf-kit-data-bulk-upsert)
|
|
39
|
+
- [`sf kit data csv convert`](#sf-kit-data-csv-convert)
|
|
40
|
+
- [`sf kit layout assignments deploy`](#sf-kit-layout-assignments-deploy)
|
|
41
|
+
- [`sf kit layout assignments retrieve`](#sf-kit-layout-assignments-retrieve)
|
|
42
|
+
- [`sf kit object fields describe`](#sf-kit-object-fields-describe)
|
|
43
|
+
- [`sf kit object fields setup`](#sf-kit-object-fields-setup)
|
|
44
|
+
- [`sf kit script`](#sf-kit-script)
|
|
45
|
+
- [`sf kit script execute`](#sf-kit-script-execute)
|
|
59
46
|
|
|
60
|
-
|
|
61
|
-
org; overrides default target org
|
|
47
|
+
## `sf kit data bulk delete`
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
the command to complete before
|
|
65
|
-
displaying the results
|
|
49
|
+
Bulk delete records by SOQL select query.
|
|
66
50
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
mode (Parallel or Serial) for the
|
|
72
|
-
job
|
|
51
|
+
```
|
|
52
|
+
USAGE
|
|
53
|
+
$ sf kit data bulk delete -q <value> -o <value> [--json] [--hard] [--concurrencymode <value>] [-s <value>] [-w <value>]
|
|
54
|
+
[--api-version <value>]
|
|
73
55
|
|
|
74
|
-
|
|
56
|
+
FLAGS
|
|
57
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
58
|
+
-q, --query=<value> (required) SOQL query to delete
|
|
59
|
+
-s, --batchsize=<value> [default: 10000] The batch size of the job
|
|
60
|
+
-w, --wait=<value> The number of minutes to wait for the command to complete before displaying the results
|
|
61
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
62
|
+
--concurrencymode=<value> [default: Parallel] The concurrency mode (Parallel or Serial) for the job
|
|
63
|
+
--hard Perform a hard delete
|
|
75
64
|
|
|
76
|
-
|
|
65
|
+
GLOBAL FLAGS
|
|
66
|
+
--json Format output as json.
|
|
77
67
|
|
|
78
|
-
|
|
79
|
-
|
|
68
|
+
EXAMPLES
|
|
69
|
+
Delete Opportunity records with CloseDate older than 2 years:
|
|
80
70
|
|
|
81
|
-
|
|
82
|
-
$ sfdx kit:data:bulk:delete -q 'SELECT Id FROM Opportunity WHERE CloseDate < LAST_N_YEARS:5'
|
|
71
|
+
$ sf kit data bulk delete -q "SELECT Id FROM Opportunity WHERE CloseDate < LAST_N_YEARS:2"
|
|
83
72
|
```
|
|
84
73
|
|
|
85
|
-
|
|
74
|
+
## `sf kit data bulk insert`
|
|
86
75
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
bulk insert records from a CSV file
|
|
76
|
+
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
90
77
|
|
|
91
78
|
```
|
|
92
79
|
USAGE
|
|
93
|
-
$
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
-r, --resultfile=resultfile the CSV file path for writing the
|
|
121
|
-
insert results
|
|
122
|
-
|
|
123
|
-
-s, --batchsize=batchsize [default: 10000] the batch size of
|
|
124
|
-
the job
|
|
125
|
-
|
|
126
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
127
|
-
org; overrides default target org
|
|
128
|
-
|
|
129
|
-
-w, --wait=wait the number of minutes to wait for
|
|
130
|
-
the command to complete before
|
|
131
|
-
displaying the results
|
|
132
|
-
|
|
133
|
-
--apiversion=apiversion override the api version used for
|
|
134
|
-
api requests made by this command
|
|
135
|
-
|
|
136
|
-
--assignmentruleid=assignmentruleid the ID of a specific assignment rule
|
|
137
|
-
to run for a case or a lead.
|
|
138
|
-
|
|
139
|
-
--concurrencymode=concurrencymode [default: Parallel] the concurrency
|
|
140
|
-
mode (Parallel or Serial) for the
|
|
141
|
-
job
|
|
142
|
-
|
|
143
|
-
--convertonly output converted.csv file and skip
|
|
144
|
-
insert for debugging
|
|
145
|
-
|
|
146
|
-
--json format output as json
|
|
147
|
-
|
|
148
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
149
|
-
this command invocation
|
|
150
|
-
|
|
151
|
-
--setnull set blank values as null values
|
|
152
|
-
during insert operations (default:
|
|
153
|
-
empty field values are ignored)
|
|
154
|
-
|
|
155
|
-
--skiplines=skiplines [default: 0] the number of lines to
|
|
156
|
-
skip
|
|
157
|
-
|
|
158
|
-
--trim trim all white space from columns
|
|
80
|
+
$ sf kit data bulk insert -s <value> -f <value> -o <value> [--json] [-r <value>] [-e <value>] [-d <value>] [-q <value>]
|
|
81
|
+
[--skiplines <value>] [--trim] [-m <value>] [-c <value>] [--setnull] [--convertonly] [--concurrencymode <value>]
|
|
82
|
+
[--assignmentruleid <value>] [--batchsize <value>] [-w <value>] [--api-version <value>]
|
|
83
|
+
|
|
84
|
+
FLAGS
|
|
85
|
+
-c, --converter=<value> The path of the script to convert CSV rows
|
|
86
|
+
-d, --delimiter=<value> [default: ,] The input CSV file delimiter
|
|
87
|
+
-e, --encoding=<value> [default: utf8] The input CSV file encoding
|
|
88
|
+
-f, --csvfile=<value> (required) The CSV file path that defines the records to insert
|
|
89
|
+
-m, --mapping=<value> The path of the JSON file that defines CSV column mappings
|
|
90
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
91
|
+
-q, --quote=<value> [default: "] The input CSV file quote character
|
|
92
|
+
-r, --resultfile=<value> The CSV file path for writing the insert results
|
|
93
|
+
-s, --sobject=<value> (required) The SObject name to insert
|
|
94
|
+
-w, --wait=<value> The number of minutes to wait for the command to complete before displaying the results
|
|
95
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
96
|
+
--assignmentruleid=<value> The ID of a specific assignment rule to run for a case or a lead
|
|
97
|
+
--batchsize=<value> [default: 10000] The batch size of the job
|
|
98
|
+
--concurrencymode=<value> [default: Parallel] The concurrency mode (Parallel or Serial) for the job
|
|
99
|
+
--convertonly Output converted.csv file and skip insert for debugging
|
|
100
|
+
--setnull Set blank values as null values during insert operations (default: empty field values are
|
|
101
|
+
ignored)
|
|
102
|
+
--skiplines=<value> The number of lines to skip
|
|
103
|
+
--trim Trim all white space from columns
|
|
104
|
+
|
|
105
|
+
GLOBAL FLAGS
|
|
106
|
+
--json Format output as json.
|
|
159
107
|
|
|
160
108
|
DESCRIPTION
|
|
161
|
-
For information about CSV file formats, see [Prepare CSV
|
|
162
|
-
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
109
|
+
For information about CSV file formats, see [Prepare CSV
|
|
110
|
+
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
163
111
|
the Bulk API Developer Guide.
|
|
164
112
|
|
|
165
113
|
EXAMPLES
|
|
166
|
-
|
|
167
|
-
$ sfdx kit:data:bulk:insert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
|
|
168
|
-
```
|
|
114
|
+
Insert Account records with mapping.json:
|
|
169
115
|
|
|
170
|
-
|
|
116
|
+
$ sf kit data bulk insert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
|
|
171
117
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
bulk query records
|
|
118
|
+
Insert MyObject\_\_c records with convert.js:
|
|
175
119
|
|
|
120
|
+
$ sf kit data bulk insert -o MyObject**c -f ./path/to/MyObject**c.csv -c ./path/to/convert.js -w 10
|
|
176
121
|
```
|
|
177
|
-
USAGE
|
|
178
|
-
$ sfdx kit:data:bulk:query -q <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
179
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
180
122
|
|
|
181
|
-
|
|
182
|
-
-f, --csvfile=csvfile output csv file (default: standard
|
|
183
|
-
output)
|
|
123
|
+
## `sf kit data bulk query`
|
|
184
124
|
|
|
185
|
-
|
|
125
|
+
Bulk query records.
|
|
186
126
|
|
|
187
|
-
|
|
188
|
-
|
|
127
|
+
```
|
|
128
|
+
USAGE
|
|
129
|
+
$ sf kit data bulk query -q <value> -o <value> [--json] [-f <value>] [--api-version <value>]
|
|
189
130
|
|
|
190
|
-
|
|
191
|
-
|
|
131
|
+
FLAGS
|
|
132
|
+
-f, --csvfile=<value> [default: standard output] Output csv file
|
|
133
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
134
|
+
-q, --query=<value> (required) SOQL query to export
|
|
135
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
192
136
|
|
|
193
|
-
|
|
137
|
+
GLOBAL FLAGS
|
|
138
|
+
--json Format output as json.
|
|
194
139
|
|
|
195
|
-
|
|
196
|
-
|
|
140
|
+
EXAMPLES
|
|
141
|
+
Query Account records and save to specified path:
|
|
197
142
|
|
|
198
|
-
|
|
199
|
-
$ sfdx kit:data:bulk:query -q 'SELECT Id, Name FROM Account' -f ./path/to/Account.csv
|
|
143
|
+
$ sf kit data bulk query -q "SELECT Id, Name FROM Account" -f ./path/to/Account.csv
|
|
200
144
|
```
|
|
201
145
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
## `sfdx kit:data:bulk:update -o <string> -f <filepath> [-r <filepath>] [-e <string>] [-d <string>] [-q <string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly] [--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
146
|
+
## `sf kit data bulk update`
|
|
205
147
|
|
|
206
|
-
|
|
148
|
+
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
207
149
|
|
|
208
150
|
```
|
|
209
151
|
USAGE
|
|
210
|
-
$
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
152
|
+
$ sf kit data bulk update -s <value> -f <value> -o <value> [--json] [-r <value>] [-e <value>] [-d <value>] [-q <value>]
|
|
153
|
+
[--skiplines <value>] [--trim] [-m <value>] [-c <value>] [--setnull] [--convertonly] [--concurrencymode <value>]
|
|
154
|
+
[--assignmentruleid <value>] [--batchsize <value>] [-w <value>] [--api-version <value>]
|
|
155
|
+
|
|
156
|
+
FLAGS
|
|
157
|
+
-c, --converter=<value> The path of the script to convert CSV rows
|
|
158
|
+
-d, --delimiter=<value> [default: ,] The input CSV file delimiter
|
|
159
|
+
-e, --encoding=<value> [default: utf8] The input CSV file encoding
|
|
160
|
+
-f, --csvfile=<value> (required) The CSV file path that defines the records to update
|
|
161
|
+
-m, --mapping=<value> The path of the JSON file that defines CSV column mappings
|
|
162
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
163
|
+
-q, --quote=<value> [default: "] The input CSV file quote character
|
|
164
|
+
-r, --resultfile=<value> The CSV file path for writing the update results
|
|
165
|
+
-s, --sobject=<value> (required) The SObject name to update
|
|
166
|
+
-w, --wait=<value> The number of minutes to wait for the command to complete before displaying the results
|
|
167
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
168
|
+
--assignmentruleid=<value> The ID of a specific assignment rule to run for a case or a lead
|
|
169
|
+
--batchsize=<value> [default: 10000] The batch size of the job
|
|
170
|
+
--concurrencymode=<value> [default: Parallel] The concurrency mode (Parallel or Serial) for the job
|
|
171
|
+
--convertonly Output converted.csv file and skip update for debugging
|
|
172
|
+
--setnull Set blank values as null values during update operations (default: empty field values are
|
|
173
|
+
ignored)
|
|
174
|
+
--skiplines=<value> The number of lines to skip
|
|
175
|
+
--trim Trim all white space from columns
|
|
176
|
+
|
|
177
|
+
GLOBAL FLAGS
|
|
178
|
+
--json Format output as json.
|
|
236
179
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
the job
|
|
242
|
-
|
|
243
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
244
|
-
org; overrides default target org
|
|
245
|
-
|
|
246
|
-
-w, --wait=wait the number of minutes to wait for
|
|
247
|
-
the command to complete before
|
|
248
|
-
displaying the results
|
|
249
|
-
|
|
250
|
-
--apiversion=apiversion override the api version used for
|
|
251
|
-
api requests made by this command
|
|
252
|
-
|
|
253
|
-
--assignmentruleid=assignmentruleid the ID of a specific assignment rule
|
|
254
|
-
to run for a case or a lead.
|
|
180
|
+
DESCRIPTION
|
|
181
|
+
For information about CSV file formats, see [Prepare CSV
|
|
182
|
+
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
183
|
+
the Bulk API Developer Guide.
|
|
255
184
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
job
|
|
185
|
+
EXAMPLES
|
|
186
|
+
Update Account records with mapping.json:
|
|
259
187
|
|
|
260
|
-
|
|
261
|
-
update for debugging
|
|
188
|
+
$ sf kit data bulk update -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
|
|
262
189
|
|
|
263
|
-
|
|
190
|
+
Update MyObject\_\_c records with convert.js:
|
|
264
191
|
|
|
265
|
-
|
|
266
|
-
|
|
192
|
+
$ sf kit data bulk update -o MyObject**c -f ./path/to/MyObject**c.csv -c ./path/to/convert.js -w 10
|
|
193
|
+
```
|
|
267
194
|
|
|
268
|
-
|
|
269
|
-
during update operations (default:
|
|
270
|
-
empty field values are ignored)
|
|
195
|
+
## `sf kit data bulk upsert`
|
|
271
196
|
|
|
272
|
-
|
|
273
|
-
skip
|
|
197
|
+
For information about CSV file formats, see [Prepare CSV Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in the Bulk API Developer Guide.
|
|
274
198
|
|
|
275
|
-
|
|
199
|
+
```
|
|
200
|
+
USAGE
|
|
201
|
+
$ sf kit data bulk upsert -s <value> -f <value> -o <value> -i <value> [--json] [-r <value>] [-e <value>] [-d <value>]
|
|
202
|
+
[-q <value>] [--skiplines <value>] [--trim] [-m <value>] [-c <value>] [--setnull] [--convertonly] [--concurrencymode
|
|
203
|
+
<value>] [--assignmentruleid <value>] [--batchsize <value>] [-w <value>] [--api-version <value>]
|
|
204
|
+
|
|
205
|
+
FLAGS
|
|
206
|
+
-c, --converter=<value> The path of the script to convert CSV rows
|
|
207
|
+
-d, --delimiter=<value> [default: ,] The input CSV file delimiter
|
|
208
|
+
-e, --encoding=<value> [default: utf8] The input CSV file encoding
|
|
209
|
+
-f, --csvfile=<value> (required) The CSV file path that defines the records to upsert
|
|
210
|
+
-i, --externalid=<value> (required) [default: Id] The column name of the external ID
|
|
211
|
+
-m, --mapping=<value> The path of the JSON file that defines CSV column mappings
|
|
212
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
213
|
+
-q, --quote=<value> [default: "] The input CSV file quote character
|
|
214
|
+
-r, --resultfile=<value> The CSV file path for writing the upsert results
|
|
215
|
+
-s, --sobject=<value> (required) The SObject name to upsert
|
|
216
|
+
-w, --wait=<value> The number of minutes to wait for the command to complete before displaying the results
|
|
217
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
218
|
+
--assignmentruleid=<value> The ID of a specific assignment rule to run for a case or a lead
|
|
219
|
+
--batchsize=<value> [default: 10000] The batch size of the job
|
|
220
|
+
--concurrencymode=<value> [default: Parallel] The concurrency mode (Parallel or Serial) for the job
|
|
221
|
+
--convertonly Output converted.csv file and skip upsert for debugging
|
|
222
|
+
--setnull Set blank values as null values during upsert operations (default: empty field values are
|
|
223
|
+
ignored)
|
|
224
|
+
--skiplines=<value> The number of lines to skip
|
|
225
|
+
--trim Trim all white space from columns
|
|
226
|
+
|
|
227
|
+
GLOBAL FLAGS
|
|
228
|
+
--json Format output as json.
|
|
276
229
|
|
|
277
230
|
DESCRIPTION
|
|
278
|
-
For information about CSV file formats, see [Prepare CSV
|
|
279
|
-
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
231
|
+
For information about CSV file formats, see [Prepare CSV
|
|
232
|
+
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
280
233
|
the Bulk API Developer Guide.
|
|
281
234
|
|
|
282
235
|
EXAMPLES
|
|
283
|
-
|
|
284
|
-
$ sfdx kit:data:bulk:update -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -w 10
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
_See code: [src/commands/kit/data/bulk/update.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.4.6/src/commands/kit/data/bulk/update.ts)_
|
|
236
|
+
Upsert Account records with mapping.json:
|
|
288
237
|
|
|
289
|
-
|
|
238
|
+
$ sf kit data bulk upsert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
|
|
290
239
|
|
|
291
|
-
|
|
240
|
+
Upsert MyObject\_\_c with convert.js and external ID
|
|
292
241
|
|
|
242
|
+
$ sf kit data bulk upsert -o MyObject**c -f ./path/to/MyObject**c.csv -c ./path/to/convert.js -i \
|
|
243
|
+
MyExternalId\_\_c -w 10
|
|
293
244
|
```
|
|
294
|
-
USAGE
|
|
295
|
-
$ sfdx kit:data:bulk:upsert -o <string> -f <filepath> -i <string> [-r <filepath>] [-e <string>] [-d <string>] [-q
|
|
296
|
-
<string>] [--skiplines <integer>] [--trim] [-m <filepath>] [-c <filepath>] [--setnull] [--convertonly]
|
|
297
|
-
[--concurrencymode <string>] [--assignmentruleid <string>] [-s <integer>] [-w <integer>] [-u <string>] [--apiversion
|
|
298
|
-
<string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
299
245
|
|
|
300
|
-
|
|
301
|
-
-c, --converter=converter the path of the script to convert
|
|
302
|
-
CSV rows
|
|
246
|
+
## `sf kit data csv convert`
|
|
303
247
|
|
|
304
|
-
|
|
305
|
-
delimiter
|
|
248
|
+
Convert CSV data using column mapping file or Node.js script.
|
|
306
249
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
250
|
+
```
|
|
251
|
+
USAGE
|
|
252
|
+
$ sf kit data csv convert [--json] [-i <value>] [-o <value>] [-e <value>] [-d <value>] [-q <value>] [--skiplines
|
|
253
|
+
<value>] [--trim] [-m <value>] [-c <value>]
|
|
254
|
+
|
|
255
|
+
FLAGS
|
|
256
|
+
-c, --converter=<value> The path of the script to convert CSV rows
|
|
257
|
+
-d, --delimiter=<value> [default: ,] The input CSV file delimiter
|
|
258
|
+
-e, --encoding=<value> [default: utf8] The input CSV file encoding
|
|
259
|
+
-i, --input=<value> [default: standard input] The path of the input CSV file
|
|
260
|
+
-m, --mapping=<value> The path of the JSON file that defines CSV column mappings
|
|
261
|
+
-o, --output=<value> [default: standard output] The path of the output CSV file
|
|
262
|
+
-q, --quote=<value> [default: "] The input CSV file quote character
|
|
263
|
+
--skiplines=<value> The number of lines to skip
|
|
264
|
+
--trim Trim all white space from columns
|
|
265
|
+
|
|
266
|
+
GLOBAL FLAGS
|
|
267
|
+
--json Format output as json.
|
|
324
268
|
|
|
325
|
-
|
|
326
|
-
|
|
269
|
+
EXAMPLES
|
|
270
|
+
Convert csv file using mapping file and output to standard output:
|
|
327
271
|
|
|
328
|
-
|
|
329
|
-
the job
|
|
272
|
+
$ sf kit data csv convert -i ./path/to/input.csv -m ./path/to/mapping.json
|
|
330
273
|
|
|
331
|
-
|
|
332
|
-
org; overrides default target org
|
|
274
|
+
Convert csv file using script and output to specified path:
|
|
333
275
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
displaying the results
|
|
276
|
+
$ sf kit data csv convert -i ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js
|
|
277
|
+
```
|
|
337
278
|
|
|
338
|
-
|
|
339
|
-
api requests made by this command
|
|
279
|
+
## `sf kit layout assignments deploy`
|
|
340
280
|
|
|
341
|
-
|
|
342
|
-
to run for a case or a lead.
|
|
281
|
+
Deploy page layout assignments from JSON file.
|
|
343
282
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
283
|
+
```
|
|
284
|
+
USAGE
|
|
285
|
+
$ sf kit layout assignments deploy -f <value> -o <value> [--json] [--api-version <value>]
|
|
347
286
|
|
|
348
|
-
|
|
349
|
-
|
|
287
|
+
FLAGS
|
|
288
|
+
-f, --file=<value> (required) [default: config/layout-assignments.json] Input file path of page layout
|
|
289
|
+
assignment settings.
|
|
290
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
291
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
350
292
|
|
|
351
|
-
|
|
293
|
+
GLOBAL FLAGS
|
|
294
|
+
--json Format output as json.
|
|
352
295
|
|
|
353
|
-
|
|
354
|
-
|
|
296
|
+
EXAMPLES
|
|
297
|
+
Deploy from the default file path to the default org:
|
|
355
298
|
|
|
356
|
-
|
|
357
|
-
during upsert operations (default:
|
|
358
|
-
empty field values are ignored)
|
|
299
|
+
$ sf kit layout assignments deploy
|
|
359
300
|
|
|
360
|
-
|
|
361
|
-
skip
|
|
301
|
+
Deploy from the specified file to the default org:
|
|
362
302
|
|
|
363
|
-
|
|
303
|
+
$ sf kit layout assignments deploy -f config/layout-assignments.scratch.json
|
|
364
304
|
|
|
365
|
-
|
|
366
|
-
For information about CSV file formats, see [Prepare CSV
|
|
367
|
-
Files](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/datafiles_csv_preparing.htm) in
|
|
368
|
-
the Bulk API Developer Guide.
|
|
305
|
+
Deploy from the specified file to the specified org:
|
|
369
306
|
|
|
370
|
-
|
|
371
|
-
$ sfdx kit:data:bulk:upsert -o Account -f ./path/to/Account.csv -m ./path/to/mapping.json
|
|
372
|
-
$ sfdx kit:data:bulk:upsert -o MyObject__c -f ./path/to/MyObject__c.csv -c ./path/to/convert.js -i MyExternalId__c -w
|
|
373
|
-
10
|
|
307
|
+
$ sf kit layout assignments deploy -o me@my.org -f config/layout-assignments.sandbox.json
|
|
374
308
|
```
|
|
375
309
|
|
|
376
|
-
|
|
310
|
+
## `sf kit layout assignments retrieve`
|
|
377
311
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
convert CSV data using column mapping file or Node.js script
|
|
312
|
+
Retrieve page layout assignments and save to JSON file.
|
|
381
313
|
|
|
382
314
|
```
|
|
383
315
|
USAGE
|
|
384
|
-
$
|
|
385
|
-
<
|
|
386
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
387
|
-
|
|
388
|
-
OPTIONS
|
|
389
|
-
-c, --converter=converter the path of the script to convert
|
|
390
|
-
CSV rows
|
|
391
|
-
|
|
392
|
-
-d, --delimiter=delimiter [default: ,] the input CSV file
|
|
393
|
-
delimiter
|
|
394
|
-
|
|
395
|
-
-e, --encoding=encoding [default: utf8] the input CSV file
|
|
396
|
-
encoding
|
|
316
|
+
$ sf kit layout assignments retrieve -f <value> -o <value> [--json] [-p <value>] [-s <value>] [--merge] [--api-version
|
|
317
|
+
<value>]
|
|
397
318
|
|
|
398
|
-
|
|
399
|
-
|
|
319
|
+
FLAGS
|
|
320
|
+
-f, --file=<value> (required) [default: config/layout-assignments.json] Output file path of page layout
|
|
321
|
+
assignment settings.
|
|
322
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
323
|
+
-p, --profile=<value>... [default: all profiles] Profile names to retrieve
|
|
324
|
+
-s, --sobject=<value>... [default: sobjects which have multiple layouts] SObject names to retrieve
|
|
325
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
326
|
+
--merge Merge retrieved configurations with existing file.
|
|
400
327
|
|
|
401
|
-
|
|
402
|
-
|
|
328
|
+
GLOBAL FLAGS
|
|
329
|
+
--json Format output as json.
|
|
403
330
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
-q, --quote=quote [default: "] the input CSV file
|
|
408
|
-
quote character
|
|
331
|
+
EXAMPLES
|
|
332
|
+
Retrieve page layout assignments from the default org and save to the default path:
|
|
409
333
|
|
|
410
|
-
|
|
334
|
+
$ sf kit layout assignments retrieve
|
|
411
335
|
|
|
412
|
-
|
|
413
|
-
this command invocation
|
|
336
|
+
Retrieve Admin profile's Account and Contact page layout assignments and save to the specified path:
|
|
414
337
|
|
|
415
|
-
|
|
416
|
-
skip
|
|
338
|
+
$ sf kit layout assignments retrieve -p Admin -s Account -s Contact -f config/layout-assignments.scratch.json
|
|
417
339
|
|
|
418
|
-
|
|
340
|
+
Retrieve page layout assignments from the specified org and save to the specified path:
|
|
419
341
|
|
|
420
|
-
|
|
421
|
-
$ sfdx kit:data:csv:convert -f ./path/to/input.csv -m ./path/to/mapping.json
|
|
422
|
-
$ sfdx kit:data:csv:convert -f ./path/to/input.csv -o ./path/to/output.csv -c ./path/to/convert.js -e cp932 -d :
|
|
342
|
+
$ sf kit layout assignments retrieve -o me@my.org -f config/layout-assignments.sandbox.json
|
|
423
343
|
```
|
|
424
344
|
|
|
425
|
-
|
|
345
|
+
## `sf kit object fields describe`
|
|
426
346
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
deploy page layout assignments from JSON file
|
|
347
|
+
Describe sobject fields information.
|
|
430
348
|
|
|
431
349
|
```
|
|
432
350
|
USAGE
|
|
433
|
-
$
|
|
434
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
351
|
+
$ sf kit object fields describe -s <value> -o <value> [--json] [-f <value>] [--api-version <value>]
|
|
435
352
|
|
|
436
|
-
|
|
437
|
-
-f, --file
|
|
438
|
-
|
|
439
|
-
|
|
353
|
+
FLAGS
|
|
354
|
+
-f, --file=<value> Output csv file path
|
|
355
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
356
|
+
-s, --sobject=<value> (required) SObject name to describe
|
|
357
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
440
358
|
|
|
441
|
-
|
|
442
|
-
|
|
359
|
+
GLOBAL FLAGS
|
|
360
|
+
--json Format output as json.
|
|
443
361
|
|
|
444
|
-
|
|
445
|
-
|
|
362
|
+
EXAMPLES
|
|
363
|
+
Describe Account fields of the default org and save to csv file:
|
|
446
364
|
|
|
447
|
-
|
|
365
|
+
$ sf kit object fields describe -s Account -f path/to/account_fields.csv
|
|
448
366
|
|
|
449
|
-
|
|
450
|
-
this command invocation
|
|
367
|
+
Output CustomObject\_\_c fields of the specified org as JSON format:
|
|
451
368
|
|
|
452
|
-
|
|
453
|
-
$ sfdx kit:layout:assignments:deploy
|
|
454
|
-
$ sfdx kit:layout:assignments:deploy -f config/layout-assignments.scratch.json
|
|
455
|
-
$ sfdx kit:layout:assignments:deploy -u me@my.org -f config/layout-assignments.sandbox.json
|
|
369
|
+
$ sf kit object fields describe -o me@my.org -s CustomObject\_\_c --json
|
|
456
370
|
```
|
|
457
371
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
## `sfdx kit:layout:assignments:retrieve -f <string> [-p <string>] [-o <string>] [--merge] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
372
|
+
## `sf kit object fields setup`
|
|
461
373
|
|
|
462
|
-
|
|
374
|
+
Upsert and delete sobject fields from a CSV file.
|
|
463
375
|
|
|
464
376
|
```
|
|
465
377
|
USAGE
|
|
466
|
-
$
|
|
467
|
-
<string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
468
|
-
|
|
469
|
-
OPTIONS
|
|
470
|
-
-f, --file=file (required) [default:
|
|
471
|
-
config/layout-assignments.json]
|
|
472
|
-
output file path
|
|
473
|
-
|
|
474
|
-
-o, --object=object comma separated object names to
|
|
475
|
-
retrieve (default: objects which
|
|
476
|
-
have multiple layouts)
|
|
477
|
-
|
|
478
|
-
-p, --profile=profile comma separated profile names to
|
|
479
|
-
retrieve (default: all profiles)
|
|
378
|
+
$ sf kit object fields setup -s <value> -f <value> -o <value> [--json] [--delete] [--force] [--api-version <value>]
|
|
480
379
|
|
|
481
|
-
|
|
482
|
-
|
|
380
|
+
FLAGS
|
|
381
|
+
-f, --file=<value> (required) Input csv file path
|
|
382
|
+
-o, --target-org=<value> (required) Username or alias of the target org.
|
|
383
|
+
-s, --sobject=<value> (required) SObject name to setup
|
|
384
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
385
|
+
--delete Delete fields that are not in the csv file
|
|
386
|
+
--force Do not confirm when deleting
|
|
483
387
|
|
|
484
|
-
|
|
485
|
-
|
|
388
|
+
GLOBAL FLAGS
|
|
389
|
+
--json Format output as json.
|
|
486
390
|
|
|
487
|
-
|
|
391
|
+
EXAMPLES
|
|
392
|
+
Upsert Account fields to the default org:
|
|
488
393
|
|
|
489
|
-
|
|
490
|
-
this command invocation
|
|
394
|
+
$ sf kit object fields setup -s Account -f path/to/account_fields.csv
|
|
491
395
|
|
|
492
|
-
|
|
493
|
-
existing file
|
|
396
|
+
Upsert and delete CustomObject\_\_c fields to the specified org:
|
|
494
397
|
|
|
495
|
-
|
|
496
|
-
$ sfdx kit:layout:assignments:retrieve
|
|
497
|
-
$ sfdx kit:layout:assignments:retrieve -p Admin,Standard,StandardAul -o Account,CustomObject__c -f
|
|
498
|
-
config/layout-assignments.scratch.json
|
|
499
|
-
$ sfdx kit:layout:assignments:retrieve -u me@my.org -f config/layout-assignments.sandbox.json
|
|
398
|
+
$ sf kit object fields setup -o me@my.org -s CustomObject\_\_c -f path/to/custom_object_fields.csv --delete
|
|
500
399
|
```
|
|
501
400
|
|
|
502
|
-
|
|
401
|
+
## `sf kit script`
|
|
503
402
|
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
describe object fields information
|
|
403
|
+
Execute Node.js scripts in SfCommand context.
|
|
507
404
|
|
|
508
405
|
```
|
|
509
406
|
USAGE
|
|
510
|
-
$
|
|
511
|
-
|
|
407
|
+
$ sf kit script [--json] [-f <value>] [-o <value>] [--api-version <value>]
|
|
408
|
+
|
|
409
|
+
FLAGS
|
|
410
|
+
-f, --file=<value> The path of the Node.js script file to execute.
|
|
411
|
+
-o, --target-org=<value>
|
|
412
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
512
413
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
-o, --object=object (required) SObject name
|
|
414
|
+
GLOBAL FLAGS
|
|
415
|
+
--json Format output as json.
|
|
516
416
|
|
|
517
|
-
|
|
518
|
-
|
|
417
|
+
DESCRIPTION
|
|
418
|
+
Execute Node.js scripts in SfCommand context.
|
|
519
419
|
|
|
520
|
-
|
|
521
|
-
api requests made by this command
|
|
420
|
+
Available variables in Node.js scripts
|
|
522
421
|
|
|
523
|
-
|
|
422
|
+
- argv: Parsed command line arguments after the file option
|
|
423
|
+
- conn: jsforce Connection
|
|
424
|
+
- context: SfCommand
|
|
524
425
|
|
|
525
|
-
|
|
526
|
-
|
|
426
|
+
ALIASES
|
|
427
|
+
$ sf kit script
|
|
527
428
|
|
|
528
429
|
EXAMPLES
|
|
529
|
-
|
|
530
|
-
$ sfdx kit:object:fields:describe -u me@my.org -o CustomObject__c --json
|
|
531
|
-
```
|
|
430
|
+
Execute from js file:
|
|
532
431
|
|
|
533
|
-
|
|
432
|
+
$ sf kit script -f ./path/to/script.js
|
|
534
433
|
|
|
535
|
-
|
|
434
|
+
Execute in REPL mode:
|
|
536
435
|
|
|
537
|
-
|
|
436
|
+
$ sf kit script -o target-org
|
|
538
437
|
|
|
438
|
+
query a account from org in REPL
|
|
439
|
+
> await conn.query('SELECT Id, Name FROM Account LIMIT 1')
|
|
440
|
+
Top level await is not enabled by default in REPL before Node.js v16
|
|
441
|
+
$ NODE_OPTIONS=--experimental-repl-await sf kit script
|
|
539
442
|
```
|
|
540
|
-
USAGE
|
|
541
|
-
$ sfdx kit:object:fields:setup -o <string> -f <string> [--delete] [--force] [-u <string>] [--apiversion <string>]
|
|
542
|
-
[--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
543
|
-
|
|
544
|
-
OPTIONS
|
|
545
|
-
-f, --file=file (required) input csv file path
|
|
546
|
-
-o, --object=object (required) SObject name
|
|
547
|
-
|
|
548
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
549
|
-
org; overrides default target org
|
|
550
|
-
|
|
551
|
-
--apiversion=apiversion override the api version used for
|
|
552
|
-
api requests made by this command
|
|
553
|
-
|
|
554
|
-
--delete delete fields that are not in the
|
|
555
|
-
csv file
|
|
556
443
|
|
|
557
|
-
|
|
444
|
+
## `sf kit script execute`
|
|
558
445
|
|
|
559
|
-
|
|
446
|
+
Execute Node.js scripts in SfCommand context.
|
|
560
447
|
|
|
561
|
-
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
562
|
-
this command invocation
|
|
563
|
-
|
|
564
|
-
EXAMPLES
|
|
565
|
-
$ sfdx kit:object:fields:setup -o Account -f path/to/account_fields.csv
|
|
566
|
-
$ sfdx kit:object:fields:setup -u me@my.org -o CustomObject__c -f path/to/custom_object_fields.csv --delete
|
|
567
448
|
```
|
|
449
|
+
USAGE
|
|
450
|
+
$ sf kit script execute [--json] [-f <value>] [-o <value>] [--api-version <value>]
|
|
568
451
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
452
|
+
FLAGS
|
|
453
|
+
-f, --file=<value> The path of the Node.js script file to execute.
|
|
454
|
+
-o, --target-org=<value>
|
|
455
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
572
456
|
|
|
573
|
-
|
|
457
|
+
GLOBAL FLAGS
|
|
458
|
+
--json Format output as json.
|
|
574
459
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
$ sfdx kit:script:execute [-f <filepath>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
578
|
-
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
460
|
+
DESCRIPTION
|
|
461
|
+
Execute Node.js scripts in SfCommand context.
|
|
579
462
|
|
|
580
|
-
|
|
581
|
-
-f, --file=file the path of the Node.js script file
|
|
582
|
-
to execute
|
|
463
|
+
Available variables in Node.js scripts
|
|
583
464
|
|
|
584
|
-
-
|
|
585
|
-
|
|
465
|
+
- argv: Parsed command line arguments after the file option
|
|
466
|
+
- conn: jsforce Connection
|
|
467
|
+
- context: SfCommand
|
|
586
468
|
|
|
587
|
-
|
|
588
|
-
|
|
469
|
+
ALIASES
|
|
470
|
+
$ sf kit script
|
|
589
471
|
|
|
590
|
-
|
|
472
|
+
EXAMPLES
|
|
473
|
+
Execute from js file:
|
|
591
474
|
|
|
592
|
-
|
|
593
|
-
this command invocation
|
|
475
|
+
$ sf kit script execute -f ./path/to/script.js
|
|
594
476
|
|
|
595
|
-
|
|
596
|
-
Available variables in Node.js scripts
|
|
597
|
-
argv: Parsed command line arguments after the file option
|
|
598
|
-
conn: jsforce Connection
|
|
599
|
-
context: SfdxCommand
|
|
477
|
+
Execute in REPL mode:
|
|
600
478
|
|
|
601
|
-
|
|
602
|
-
$ sfdx kit:script
|
|
479
|
+
$ sf kit script execute -o target-org
|
|
603
480
|
|
|
604
|
-
|
|
605
|
-
$ sfdx kit:script -f ./path/to/script.js
|
|
606
|
-
$ sfdx kit:script:execute
|
|
481
|
+
query a account from org in REPL
|
|
607
482
|
> await conn.query('SELECT Id, Name FROM Account LIMIT 1')
|
|
608
483
|
Top level await is not enabled by default in REPL before Node.js v16
|
|
609
|
-
$ NODE_OPTIONS=--experimental-repl-await
|
|
484
|
+
$ NODE_OPTIONS=--experimental-repl-await sf kit script execute
|
|
610
485
|
```
|
|
611
486
|
|
|
612
|
-
_See code: [src/commands/kit/script/execute.ts](https://github.com/Kitalive-Inc/sfdx-plugin/blob/v0.4.6/src/commands/kit/script/execute.ts)_
|
|
613
487
|
<!-- commandsstop -->
|