@salesforce/plugin-data 0.6.14 → 2.0.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/CHANGELOG.md +6 -0
- package/README.md +173 -186
- package/lib/api/data/tree/exportApi.d.ts +0 -1
- package/lib/api/data/tree/exportApi.js +17 -26
- package/lib/api/data/tree/exportApi.js.map +1 -1
- package/lib/api/data/tree/importApi.js +25 -45
- package/lib/api/data/tree/importApi.js.map +1 -1
- package/lib/batcher.d.ts +7 -4
- package/lib/batcher.js +3 -7
- package/lib/batcher.js.map +1 -1
- package/lib/commands/force/data/bulk/delete.d.ts +1 -1
- package/lib/commands/force/data/bulk/delete.js +5 -4
- package/lib/commands/force/data/bulk/delete.js.map +1 -1
- package/lib/commands/force/data/bulk/status.d.ts +2 -1
- package/lib/commands/force/data/bulk/status.js +1 -4
- package/lib/commands/force/data/bulk/status.js.map +1 -1
- package/lib/commands/force/data/bulk/upsert.d.ts +1 -1
- package/lib/commands/force/data/bulk/upsert.js +3 -2
- package/lib/commands/force/data/bulk/upsert.js.map +1 -1
- package/lib/commands/force/data/record/create.d.ts +2 -2
- package/lib/commands/force/data/record/create.js.map +1 -1
- package/lib/commands/force/data/record/delete.d.ts +2 -2
- package/lib/commands/force/data/record/delete.js +1 -1
- package/lib/commands/force/data/record/delete.js.map +1 -1
- package/lib/commands/force/data/record/get.d.ts +1 -2
- package/lib/commands/force/data/record/get.js +1 -1
- package/lib/commands/force/data/record/get.js.map +1 -1
- package/lib/commands/force/data/record/update.d.ts +2 -2
- package/lib/commands/force/data/record/update.js +3 -1
- package/lib/commands/force/data/record/update.js.map +1 -1
- package/lib/commands/force/data/soql/query.d.ts +3 -4
- package/lib/commands/force/data/soql/query.js +14 -11
- package/lib/commands/force/data/soql/query.js.map +1 -1
- package/lib/commands/force/data/tree/import.js +3 -5
- package/lib/commands/force/data/tree/import.js.map +1 -1
- package/lib/dataCommand.d.ts +12 -6
- package/lib/dataCommand.js +38 -23
- package/lib/dataCommand.js.map +1 -1
- package/lib/dataSoqlQueryTypes.d.ts +2 -2
- package/lib/dataSoqlQueryTypes.js +1 -2
- package/lib/dataSoqlQueryTypes.js.map +1 -1
- package/lib/reporters.d.ts +5 -8
- package/lib/reporters.js +28 -17
- package/lib/reporters.js.map +1 -1
- package/messages/bulk.delete.json +2 -2
- package/messages/bulk.status.json +2 -2
- package/messages/bulk.upsert.json +2 -2
- package/messages/record.create.json +5 -5
- package/messages/record.delete.json +5 -5
- package/messages/record.get.json +5 -5
- package/messages/record.update.json +5 -5
- package/messages/soql.query.json +4 -4
- package/messages/tree.export.json +2 -2
- package/messages/tree.import.json +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +15 -13
package/README.md
CHANGED
|
@@ -94,42 +94,41 @@ bulk delete records from a csv file
|
|
|
94
94
|
```
|
|
95
95
|
USAGE
|
|
96
96
|
$ sfdx force:data:bulk:delete -f <filepath> -s <string> [-w <minutes>] [-u <string>] [--apiversion <string>] [--json]
|
|
97
|
-
|
|
97
|
+
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
-f, --csvfile
|
|
99
|
+
FLAGS
|
|
100
|
+
-f, --csvfile=<value> (required) the path to the CSV file
|
|
101
101
|
containing the ids of the records to
|
|
102
102
|
delete
|
|
103
|
-
|
|
104
|
-
-s, --sobjecttype=sobjecttype (required) the sObject type of the
|
|
103
|
+
-s, --sobjecttype=<value> (required) the sObject type of the
|
|
105
104
|
records you’re deleting
|
|
106
|
-
|
|
107
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
105
|
+
-u, --targetusername=<value> username or alias for the target
|
|
108
106
|
org; overrides default target org
|
|
109
|
-
|
|
110
|
-
-w, --wait=wait the number of minutes to wait for
|
|
107
|
+
-w, --wait=<value> the number of minutes to wait for
|
|
111
108
|
the command to complete before
|
|
112
109
|
displaying the results
|
|
113
|
-
|
|
114
|
-
--apiversion=apiversion override the api version used for
|
|
110
|
+
--apiversion=<value> override the api version used for
|
|
115
111
|
api requests made by this command
|
|
116
|
-
|
|
117
112
|
--json format output as json
|
|
118
|
-
|
|
119
113
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
120
114
|
this command invocation
|
|
121
115
|
|
|
122
116
|
DESCRIPTION
|
|
117
|
+
bulk delete records from a csv file
|
|
118
|
+
|
|
123
119
|
The file must be a CSV file with only one column: "Id".
|
|
120
|
+
|
|
124
121
|
One job can contain many batches, depending on the length of the CSV file.
|
|
122
|
+
|
|
125
123
|
Returns a job ID and a batch ID. Use these IDs to check job status with data:bulk:status.
|
|
126
124
|
|
|
127
125
|
EXAMPLES
|
|
128
|
-
sfdx force:data:bulk:delete -s Account -f ./path/to/file.csv
|
|
129
|
-
|
|
126
|
+
$ sfdx force:data:bulk:delete -s Account -f ./path/to/file.csv
|
|
127
|
+
|
|
128
|
+
$ sfdx force:data:bulk:delete -s MyObject__c -f ./path/to/file.csv
|
|
130
129
|
```
|
|
131
130
|
|
|
132
|
-
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
131
|
+
_See code: [src/commands/force/data/bulk/delete.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/bulk/delete.ts)_
|
|
133
132
|
|
|
134
133
|
## `sfdx force:data:bulk:status -i <string> [-b <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
135
134
|
|
|
@@ -138,37 +137,35 @@ view the status of a bulk data load job or batch
|
|
|
138
137
|
```
|
|
139
138
|
USAGE
|
|
140
139
|
$ sfdx force:data:bulk:status -i <string> [-b <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
|
141
|
-
|
|
140
|
+
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
142
141
|
|
|
143
|
-
|
|
144
|
-
-b, --batchid
|
|
142
|
+
FLAGS
|
|
143
|
+
-b, --batchid=<value> the ID of the batch whose status you
|
|
145
144
|
want to view
|
|
146
|
-
|
|
147
|
-
-i, --jobid=jobid (required) the ID of the job you
|
|
145
|
+
-i, --jobid=<value> (required) the ID of the job you
|
|
148
146
|
want to view or of the job whose
|
|
149
147
|
batch you want to view
|
|
150
|
-
|
|
151
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
148
|
+
-u, --targetusername=<value> username or alias for the target
|
|
152
149
|
org; overrides default target org
|
|
153
|
-
|
|
154
|
-
--apiversion=apiversion override the api version used for
|
|
150
|
+
--apiversion=<value> override the api version used for
|
|
155
151
|
api requests made by this command
|
|
156
|
-
|
|
157
152
|
--json format output as json
|
|
158
|
-
|
|
159
153
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
160
154
|
this command invocation
|
|
161
155
|
|
|
162
156
|
DESCRIPTION
|
|
157
|
+
view the status of a bulk data load job or batch
|
|
158
|
+
|
|
163
159
|
Run this command using the job ID or batch ID returned from the force:data:bulk:delete or force:data:bulk:upsert
|
|
164
160
|
commands.
|
|
165
161
|
|
|
166
162
|
EXAMPLES
|
|
167
|
-
sfdx force:data:bulk:status -i 750xx000000005sAAA
|
|
168
|
-
|
|
163
|
+
$ sfdx force:data:bulk:status -i 750xx000000005sAAA
|
|
164
|
+
|
|
165
|
+
$ sfdx force:data:bulk:status -i 750xx000000005sAAA -b 751xx000000005nAAA
|
|
169
166
|
```
|
|
170
167
|
|
|
171
|
-
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
168
|
+
_See code: [src/commands/force/data/bulk/status.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/bulk/status.ts)_
|
|
172
169
|
|
|
173
170
|
## `sfdx force:data:bulk:upsert -i <string> -f <filepath> -s <string> [-w <minutes>] [-r] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
174
171
|
|
|
@@ -177,39 +174,34 @@ bulk upsert records from a CSV file
|
|
|
177
174
|
```
|
|
178
175
|
USAGE
|
|
179
176
|
$ sfdx force:data:bulk:upsert -i <string> -f <filepath> -s <string> [-w <minutes>] [-r] [-u <string>] [--apiversion
|
|
180
|
-
|
|
177
|
+
<string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
181
178
|
|
|
182
|
-
|
|
183
|
-
-f, --csvfile
|
|
179
|
+
FLAGS
|
|
180
|
+
-f, --csvfile=<value> (required) the path to the CSV file
|
|
184
181
|
that defines the records to upsert
|
|
185
|
-
|
|
186
|
-
-i, --externalid=externalid (required) the column name of the
|
|
182
|
+
-i, --externalid=<value> (required) the column name of the
|
|
187
183
|
external ID
|
|
188
|
-
|
|
189
184
|
-r, --serial run batches in serial mode
|
|
190
|
-
|
|
191
|
-
-s, --sobjecttype=sobjecttype (required) the sObject type of the
|
|
185
|
+
-s, --sobjecttype=<value> (required) the sObject type of the
|
|
192
186
|
records you want to upsert
|
|
193
|
-
|
|
194
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
187
|
+
-u, --targetusername=<value> username or alias for the target
|
|
195
188
|
org; overrides default target org
|
|
196
|
-
|
|
197
|
-
-w, --wait=wait the number of minutes to wait for
|
|
189
|
+
-w, --wait=<value> the number of minutes to wait for
|
|
198
190
|
the command to complete before
|
|
199
191
|
displaying the results
|
|
200
|
-
|
|
201
|
-
--apiversion=apiversion override the api version used for
|
|
192
|
+
--apiversion=<value> override the api version used for
|
|
202
193
|
api requests made by this command
|
|
203
|
-
|
|
204
194
|
--json format output as json
|
|
205
|
-
|
|
206
195
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
207
196
|
this command invocation
|
|
208
197
|
|
|
209
198
|
DESCRIPTION
|
|
199
|
+
bulk upsert records from a CSV file
|
|
200
|
+
|
|
210
201
|
Inserts or updates records from a CSV file.
|
|
211
202
|
|
|
212
203
|
One job can contain many batches, depending on the length of the CSV file.
|
|
204
|
+
|
|
213
205
|
Returns a job ID and a batch ID. Use these IDs to check job status with data:bulk:status.
|
|
214
206
|
|
|
215
207
|
For information about formatting your CSV file, see "Prepare CSV Files" in the Bulk API Developer Guide.
|
|
@@ -217,11 +209,12 @@ DESCRIPTION
|
|
|
217
209
|
By default, the job runs the batches in parallel. Specify --serial to run them serially.
|
|
218
210
|
|
|
219
211
|
EXAMPLES
|
|
220
|
-
sfdx force:data:bulk:upsert -s MyObject__c -f ./path/to/file.csv -i MyField__c
|
|
221
|
-
|
|
212
|
+
$ sfdx force:data:bulk:upsert -s MyObject__c -f ./path/to/file.csv -i MyField__c
|
|
213
|
+
|
|
214
|
+
$ sfdx force:data:bulk:upsert -s MyObject__c -f ./path/to/file.csv -i Id -w 2
|
|
222
215
|
```
|
|
223
216
|
|
|
224
|
-
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
217
|
+
_See code: [src/commands/force/data/bulk/upsert.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/bulk/upsert.ts)_
|
|
225
218
|
|
|
226
219
|
## `sfdx force:data:record:create -s <string> -v <string> [-t] [--perflog --json] [-u <string>] [--apiversion <string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
227
220
|
|
|
@@ -230,48 +223,47 @@ creates and inserts a record
|
|
|
230
223
|
```
|
|
231
224
|
USAGE
|
|
232
225
|
$ sfdx force:data:record:create -s <string> -v <string> [-t] [--perflog --json] [-u <string>] [--apiversion <string>]
|
|
233
|
-
|
|
226
|
+
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
234
227
|
|
|
235
|
-
|
|
236
|
-
-s, --sobjecttype
|
|
228
|
+
FLAGS
|
|
229
|
+
-s, --sobjecttype=<value> (required) the type of the record
|
|
237
230
|
you’re creating
|
|
238
|
-
|
|
239
231
|
-t, --usetoolingapi create the record with tooling api
|
|
240
|
-
|
|
241
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
232
|
+
-u, --targetusername=<value> username or alias for the target
|
|
242
233
|
org; overrides default target org
|
|
243
|
-
|
|
244
|
-
-v, --values=values (required) the <fieldName>=<value>
|
|
234
|
+
-v, --values=<value> (required) the <fieldName>=<value>
|
|
245
235
|
pairs you’re creating
|
|
246
|
-
|
|
247
|
-
--apiversion=apiversion override the api version used for
|
|
236
|
+
--apiversion=<value> override the api version used for
|
|
248
237
|
api requests made by this command
|
|
249
|
-
|
|
250
238
|
--json format output as json
|
|
251
|
-
|
|
252
239
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
253
240
|
this command invocation
|
|
254
|
-
|
|
255
241
|
--perflog get API performance data
|
|
256
242
|
|
|
257
243
|
DESCRIPTION
|
|
244
|
+
creates and inserts a record
|
|
245
|
+
|
|
258
246
|
The format of a field-value pair is <fieldName>=<value>.
|
|
247
|
+
|
|
259
248
|
Enclose all field-value pairs in one set of double quotation marks, delimited by spaces.
|
|
249
|
+
|
|
260
250
|
Enclose values that contain spaces in single quotes.
|
|
261
251
|
|
|
262
252
|
To get data on API performance metrics, specify both --perflog and --json.
|
|
263
253
|
|
|
264
254
|
EXAMPLES
|
|
265
|
-
sfdx force:data:record:create -s Account -v "Name=Acme"
|
|
266
|
-
|
|
267
|
-
sfdx force:data:record:create -s Account -v "Name='Universal Containers'
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
sfdx force:data:record:create -s
|
|
255
|
+
$ sfdx force:data:record:create -s Account -v "Name=Acme"
|
|
256
|
+
|
|
257
|
+
$ sfdx force:data:record:create -s Account -v "Name='Universal Containers'"
|
|
258
|
+
|
|
259
|
+
$ sfdx force:data:record:create -s Account -v "Name='Universal Containers' Website=www.example.com"
|
|
260
|
+
|
|
261
|
+
$ sfdx force:data:record:create -t -s TraceFlag -v "DebugLevelId=7dl170000008U36AAE StartDate=2017-12-01T00:26:04.000+0000 ExpirationDate=2017-12-01T00:56:04.000+0000 LogType=CLASS_TRACING TracedEntityId=01p17000000R6bLAAS"
|
|
262
|
+
|
|
263
|
+
$ sfdx force:data:record:create -s Account -v "Name=Acme" --perflog --json
|
|
272
264
|
```
|
|
273
265
|
|
|
274
|
-
_See code: [src/commands/force/data/record/create.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
266
|
+
_See code: [src/commands/force/data/record/create.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/record/create.ts)_
|
|
275
267
|
|
|
276
268
|
## `sfdx force:data:record:delete -s <string> [-i <id> | -w <string>] [-t] [--perflog --json] [-u <string>] [--apiversion <string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
277
269
|
|
|
@@ -279,50 +271,51 @@ deletes a single record
|
|
|
279
271
|
|
|
280
272
|
```
|
|
281
273
|
USAGE
|
|
282
|
-
$ sfdx force:data:record:delete -s <string> [-i <id> | -w <string>] [-t] [--perflog --json] [-u <string>]
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
OPTIONS
|
|
286
|
-
-i, --sobjectid=sobjectid the ID of the record you’re deleting
|
|
274
|
+
$ sfdx force:data:record:delete -s <string> [-i <id> | -w <string>] [-t] [--perflog --json] [-u <string>] [--apiversion
|
|
275
|
+
<string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
287
276
|
|
|
288
|
-
|
|
277
|
+
FLAGS
|
|
278
|
+
-i, --sobjectid=<value> the ID of the record you’re deleting
|
|
279
|
+
-s, --sobjecttype=<value> (required) the type of the record
|
|
289
280
|
you’re deleting
|
|
290
|
-
|
|
291
281
|
-t, --usetoolingapi delete the record with Tooling API
|
|
292
|
-
|
|
293
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
282
|
+
-u, --targetusername=<value> username or alias for the target
|
|
294
283
|
org; overrides default target org
|
|
295
|
-
|
|
296
|
-
-w, --where=where a list of <fieldName>=<value> pairs
|
|
284
|
+
-w, --where=<value> a list of <fieldName>=<value> pairs
|
|
297
285
|
to search for
|
|
298
|
-
|
|
299
|
-
--apiversion=apiversion override the api version used for
|
|
286
|
+
--apiversion=<value> override the api version used for
|
|
300
287
|
api requests made by this command
|
|
301
|
-
|
|
302
288
|
--json format output as json
|
|
303
|
-
|
|
304
289
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
305
290
|
this command invocation
|
|
306
|
-
|
|
307
291
|
--perflog get API performance data
|
|
308
292
|
|
|
309
293
|
DESCRIPTION
|
|
294
|
+
deletes a single record
|
|
295
|
+
|
|
310
296
|
Specify an sObject type and either an ID or a list of <fieldName>=<value> pairs.
|
|
297
|
+
|
|
311
298
|
The format of a field-value pair is <fieldName>=<value>.
|
|
299
|
+
|
|
312
300
|
Enclose all field-value pairs in one set of double quotation marks, delimited by spaces.
|
|
301
|
+
|
|
313
302
|
Enclose values that contain spaces in single quotes.
|
|
314
303
|
|
|
315
304
|
To get data on API performance metrics, specify both --perflog and --json.
|
|
316
305
|
|
|
317
306
|
EXAMPLES
|
|
318
|
-
sfdx force:data:record:delete -s Account -i 001D000000Kv3dl
|
|
319
|
-
|
|
320
|
-
sfdx force:data:record:delete -s Account -w "Name=
|
|
321
|
-
|
|
322
|
-
sfdx force:data:record:delete -
|
|
307
|
+
$ sfdx force:data:record:delete -s Account -i 001D000000Kv3dl
|
|
308
|
+
|
|
309
|
+
$ sfdx force:data:record:delete -s Account -w "Name=Acme"
|
|
310
|
+
|
|
311
|
+
$ sfdx force:data:record:delete -s Account -w "Name='Universal Containers'"
|
|
312
|
+
|
|
313
|
+
$ sfdx force:data:record:delete -s Account -w "Name='Universal Containers' Phone='(123) 456-7890'"
|
|
314
|
+
|
|
315
|
+
$ sfdx force:data:record:delete -t -s TraceFlag -i 7tf170000009cU6AAI --perflog --json
|
|
323
316
|
```
|
|
324
317
|
|
|
325
|
-
_See code: [src/commands/force/data/record/delete.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
318
|
+
_See code: [src/commands/force/data/record/delete.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/record/delete.ts)_
|
|
326
319
|
|
|
327
320
|
## `sfdx force:data:record:get -s <string> [-i <id> | -w <string>] [-t] [--perflog --json] [-u <string>] [--apiversion <string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
328
321
|
|
|
@@ -331,50 +324,51 @@ displays a single record
|
|
|
331
324
|
```
|
|
332
325
|
USAGE
|
|
333
326
|
$ sfdx force:data:record:get -s <string> [-i <id> | -w <string>] [-t] [--perflog --json] [-u <string>] [--apiversion
|
|
334
|
-
|
|
327
|
+
<string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
335
328
|
|
|
336
|
-
|
|
337
|
-
-i, --sobjectid
|
|
329
|
+
FLAGS
|
|
330
|
+
-i, --sobjectid=<value> the ID of the record you’re
|
|
338
331
|
retrieving
|
|
339
|
-
|
|
340
|
-
-s, --sobjecttype=sobjecttype (required) the type of the record
|
|
332
|
+
-s, --sobjecttype=<value> (required) the type of the record
|
|
341
333
|
you’re retrieving
|
|
342
|
-
|
|
343
334
|
-t, --usetoolingapi retrieve the record with Tooling API
|
|
344
|
-
|
|
345
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
335
|
+
-u, --targetusername=<value> username or alias for the target
|
|
346
336
|
org; overrides default target org
|
|
347
|
-
|
|
348
|
-
-w, --where=where a list of <fieldName>=<value> pairs
|
|
337
|
+
-w, --where=<value> a list of <fieldName>=<value> pairs
|
|
349
338
|
to search for
|
|
350
|
-
|
|
351
|
-
--apiversion=apiversion override the api version used for
|
|
339
|
+
--apiversion=<value> override the api version used for
|
|
352
340
|
api requests made by this command
|
|
353
|
-
|
|
354
341
|
--json format output as json
|
|
355
|
-
|
|
356
342
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
357
343
|
this command invocation
|
|
358
|
-
|
|
359
344
|
--perflog get API performance data
|
|
360
345
|
|
|
361
346
|
DESCRIPTION
|
|
347
|
+
displays a single record
|
|
348
|
+
|
|
362
349
|
Specify an sObject type and either an ID or a list of <fieldName>=<value> pairs.
|
|
350
|
+
|
|
363
351
|
The format of a field-value pair is <fieldName>=<value>.
|
|
352
|
+
|
|
364
353
|
Enclose all field-value pairs in one set of double quotation marks, delimited by spaces.
|
|
354
|
+
|
|
365
355
|
Enclose values that contain spaces in single quotes.
|
|
366
356
|
|
|
367
357
|
To get data on API performance metrics, specify both --perflog and --json.
|
|
368
358
|
|
|
369
359
|
EXAMPLES
|
|
370
|
-
sfdx force:data:record:get -s Account -i 001D000000Kv3dl
|
|
371
|
-
|
|
372
|
-
sfdx force:data:record:get -s Account -w "Name=
|
|
373
|
-
|
|
374
|
-
sfdx force:data:record:get -
|
|
360
|
+
$ sfdx force:data:record:get -s Account -i 001D000000Kv3dl
|
|
361
|
+
|
|
362
|
+
$ sfdx force:data:record:get -s Account -w "Name=Acme"
|
|
363
|
+
|
|
364
|
+
$ sfdx force:data:record:get -s Account -w "Name='Universal Containers'"
|
|
365
|
+
|
|
366
|
+
$ sfdx force:data:record:get -s Account -w "Name='Universal Containers' Phone='(123) 456-7890'"
|
|
367
|
+
|
|
368
|
+
$ sfdx force:data:record:get -t -s TraceFlag -i 7tf170000009cUBAAY --perflog --json
|
|
375
369
|
```
|
|
376
370
|
|
|
377
|
-
_See code: [src/commands/force/data/record/get.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
371
|
+
_See code: [src/commands/force/data/record/get.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/record/get.ts)_
|
|
378
372
|
|
|
379
373
|
## `sfdx force:data:record:update -s <string> -v <string> [-i <id> | -w <string>] [-t] [--perflog --json] [-u <string>] [--apiversion <string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
380
374
|
|
|
@@ -383,51 +377,50 @@ updates a single record
|
|
|
383
377
|
```
|
|
384
378
|
USAGE
|
|
385
379
|
$ sfdx force:data:record:update -s <string> -v <string> [-i <id> | -w <string>] [-t] [--perflog --json] [-u <string>]
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
OPTIONS
|
|
389
|
-
-i, --sobjectid=sobjectid the ID of the record you’re updating
|
|
380
|
+
[--apiversion <string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
390
381
|
|
|
391
|
-
|
|
382
|
+
FLAGS
|
|
383
|
+
-i, --sobjectid=<value> the ID of the record you’re updating
|
|
384
|
+
-s, --sobjecttype=<value> (required) the sObject type of the
|
|
392
385
|
record you’re updating
|
|
393
|
-
|
|
394
386
|
-t, --usetoolingapi update the record with Tooling API
|
|
395
|
-
|
|
396
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
387
|
+
-u, --targetusername=<value> username or alias for the target
|
|
397
388
|
org; overrides default target org
|
|
398
|
-
|
|
399
|
-
-v, --values=values (required) the <fieldName>=<value>
|
|
389
|
+
-v, --values=<value> (required) the <fieldName>=<value>
|
|
400
390
|
pairs you’re updating
|
|
401
|
-
|
|
402
|
-
-w, --where=where a list of <fieldName>=<value> pairs
|
|
391
|
+
-w, --where=<value> a list of <fieldName>=<value> pairs
|
|
403
392
|
to search for
|
|
404
|
-
|
|
405
|
-
--apiversion=apiversion override the api version used for
|
|
393
|
+
--apiversion=<value> override the api version used for
|
|
406
394
|
api requests made by this command
|
|
407
|
-
|
|
408
395
|
--json format output as json
|
|
409
|
-
|
|
410
396
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
411
397
|
this command invocation
|
|
412
|
-
|
|
413
398
|
--perflog get API performance data
|
|
414
399
|
|
|
415
400
|
DESCRIPTION
|
|
401
|
+
updates a single record
|
|
402
|
+
|
|
416
403
|
The format of a field-value pair is <fieldName>=<value>.
|
|
404
|
+
|
|
417
405
|
Enclose all field-value pairs in one set of double quotation marks, delimited by spaces.
|
|
406
|
+
|
|
418
407
|
Enclose values that contain spaces in single quotes.
|
|
419
408
|
|
|
420
409
|
To get data on API performance metrics, specify both --perflog and --json.
|
|
421
410
|
|
|
422
411
|
EXAMPLES
|
|
423
|
-
sfdx force:data:record:update -s Account -i 001D000000Kv3dl -v "Name=NewAcme"
|
|
424
|
-
|
|
425
|
-
sfdx force:data:record:update -s Account -
|
|
426
|
-
|
|
427
|
-
sfdx force:data:record:update -s Account -i 001D000000Kv3dl -v "Name=
|
|
412
|
+
$ sfdx force:data:record:update -s Account -i 001D000000Kv3dl -v "Name=NewAcme"
|
|
413
|
+
|
|
414
|
+
$ sfdx force:data:record:update -s Account -w "Name='Old Acme'" -v "Name='New Acme'"
|
|
415
|
+
|
|
416
|
+
$ sfdx force:data:record:update -s Account -i 001D000000Kv3dl -v "Name='Acme III' Website=www.example.com"
|
|
417
|
+
|
|
418
|
+
$ sfdx force:data:record:update -t -s TraceFlag -i 7tf170000009cUBAAY -v "ExpirationDate=2017-12-01T00:58:04.000+0000"
|
|
419
|
+
|
|
420
|
+
$sfdx force:data:record:update -s Account -i 001D000000Kv3dl -v "Name=NewAcme" --perflog --json
|
|
428
421
|
```
|
|
429
422
|
|
|
430
|
-
_See code: [src/commands/force/data/record/update.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
423
|
+
_See code: [src/commands/force/data/record/update.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/record/update.ts)_
|
|
431
424
|
|
|
432
425
|
## `sfdx force:data:soql:query -q <string> [-t] [-r human|csv|json] [--perflog --json] [-u <string>] [--apiversion <string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
433
426
|
|
|
@@ -436,43 +429,41 @@ execute a SOQL query
|
|
|
436
429
|
```
|
|
437
430
|
USAGE
|
|
438
431
|
$ sfdx force:data:soql:query -q <string> [-t] [-r human|csv|json] [--perflog --json] [-u <string>] [--apiversion
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
OPTIONS
|
|
442
|
-
-q, --query=query (required) SOQL query to execute
|
|
432
|
+
<string>] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
443
433
|
|
|
434
|
+
FLAGS
|
|
435
|
+
-q, --query=<value> (required) SOQL query to execute
|
|
444
436
|
-r, --resultformat=(human|csv|json) [default: human] result format
|
|
445
437
|
emitted to stdout; --json flag
|
|
446
438
|
overrides this parameter
|
|
447
|
-
|
|
448
439
|
-t, --usetoolingapi execute query with Tooling API
|
|
449
|
-
|
|
450
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
440
|
+
-u, --targetusername=<value> username or alias for the target
|
|
451
441
|
org; overrides default target org
|
|
452
|
-
|
|
453
|
-
--apiversion=apiversion override the api version used for
|
|
442
|
+
--apiversion=<value> override the api version used for
|
|
454
443
|
api requests made by this command
|
|
455
|
-
|
|
456
444
|
--json format output as json
|
|
457
|
-
|
|
458
445
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
459
446
|
this command invocation
|
|
460
|
-
|
|
461
447
|
--perflog get API performance data
|
|
462
448
|
|
|
463
449
|
DESCRIPTION
|
|
450
|
+
execute a SOQL query
|
|
451
|
+
|
|
464
452
|
When you execute this command in a project, it executes the query against the data in your default scratch org.
|
|
465
453
|
|
|
466
454
|
To get data on API performance metrics, specify both --perflog and --json.
|
|
467
455
|
|
|
468
456
|
EXAMPLES
|
|
469
|
-
sfdx force:data:soql:query -q "SELECT Id, Name, Account.Name FROM Contact"
|
|
470
|
-
|
|
471
|
-
sfdx force:data:soql:query -q "SELECT Id, Name FROM Account WHERE ShippingState IN ('CA', 'NY')"
|
|
472
|
-
|
|
457
|
+
$ sfdx force:data:soql:query -q "SELECT Id, Name, Account.Name FROM Contact"
|
|
458
|
+
|
|
459
|
+
$ sfdx force:data:soql:query -q "SELECT Id, Name FROM Account WHERE ShippingState IN ('CA', 'NY')"
|
|
460
|
+
|
|
461
|
+
$ sfdx force:data:soql:query -q "SELECT Id, Name FROM Account WHERE ShippingState IN ('CA', 'NY')" --perflog --json
|
|
462
|
+
|
|
463
|
+
$ sfdx force:data:soql:query -q "SELECT Name FROM ApexTrigger" -t
|
|
473
464
|
```
|
|
474
465
|
|
|
475
|
-
_See code: [src/commands/force/data/soql/query.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
466
|
+
_See code: [src/commands/force/data/soql/query.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/soql/query.ts)_
|
|
476
467
|
|
|
477
468
|
## `sfdx force:data:tree:export -q <string> [-p] [-x <string>] [-d <directory>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
478
469
|
|
|
@@ -481,43 +472,40 @@ export data from an org
|
|
|
481
472
|
```
|
|
482
473
|
USAGE
|
|
483
474
|
$ sfdx force:data:tree:export -q <string> [-p] [-x <string>] [-d <directory>] [-u <string>] [--apiversion <string>]
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
OPTIONS
|
|
487
|
-
-d, --outputdir=outputdir directory to store files'
|
|
475
|
+
[--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
488
476
|
|
|
477
|
+
FLAGS
|
|
478
|
+
-d, --outputdir=<value> directory to store files'
|
|
489
479
|
-p, --plan generate mulitple sobject tree files
|
|
490
480
|
and a plan definition file for
|
|
491
481
|
aggregated import
|
|
492
|
-
|
|
493
|
-
-q, --query=query (required) soql query, or filepath
|
|
482
|
+
-q, --query=<value> (required) soql query, or filepath
|
|
494
483
|
of file containing a soql query, to
|
|
495
484
|
retrieve records
|
|
496
|
-
|
|
497
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
485
|
+
-u, --targetusername=<value> username or alias for the target
|
|
498
486
|
org; overrides default target org
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
--apiversion=apiversion override the api version used for
|
|
487
|
+
-x, --prefix=<value> prefix of generated files
|
|
488
|
+
--apiversion=<value> override the api version used for
|
|
503
489
|
api requests made by this command
|
|
504
|
-
|
|
505
490
|
--json format output as json
|
|
506
|
-
|
|
507
491
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
508
492
|
this command invocation
|
|
509
493
|
|
|
510
494
|
DESCRIPTION
|
|
495
|
+
export data from an org
|
|
496
|
+
|
|
511
497
|
Exports data from an org into sObject tree format for use with the force:data:tree:import command.
|
|
498
|
+
|
|
512
499
|
The query for export can return a maximum of 2,000 records. For more information, see the REST API Developer Guide:
|
|
513
500
|
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm
|
|
514
501
|
|
|
515
502
|
EXAMPLES
|
|
516
|
-
sfdx force:data:tree:export -q "SELECT Id, Name, (SELECT Name, Address__c FROM Properties__r) FROM Broker__c"
|
|
517
|
-
|
|
503
|
+
$ sfdx force:data:tree:export -q "SELECT Id, Name, (SELECT Name, Address__c FROM Properties__r) FROM Broker__c"
|
|
504
|
+
|
|
505
|
+
$ sfdx force:data:tree:export -q <path to file containing soql query> -x export-demo -d /tmp/sfdx-out -p
|
|
518
506
|
```
|
|
519
507
|
|
|
520
|
-
_See code: [src/commands/force/data/tree/export.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
508
|
+
_See code: [src/commands/force/data/tree/export.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/tree/export.ts)_
|
|
521
509
|
|
|
522
510
|
## `sfdx force:data:tree:import [-f <array> | -p <filepath>] [--confighelp] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
|
|
523
511
|
|
|
@@ -525,49 +513,48 @@ import data into an org
|
|
|
525
513
|
|
|
526
514
|
```
|
|
527
515
|
USAGE
|
|
528
|
-
$ sfdx force:data:tree:import [-f <array> | -p <filepath>] [--confighelp] [-u <string>] [--apiversion <string>]
|
|
529
|
-
|
|
516
|
+
$ sfdx force:data:tree:import [-f <array> | -p <filepath>] [--confighelp] [-u <string>] [--apiversion <string>] [--json]
|
|
517
|
+
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
|
530
518
|
|
|
531
|
-
|
|
532
|
-
-f, --sobjecttreefiles
|
|
519
|
+
FLAGS
|
|
520
|
+
-f, --sobjecttreefiles=<value> comma-delimited, ordered paths of
|
|
533
521
|
json files containing collection of
|
|
534
522
|
record trees to insert
|
|
535
|
-
|
|
536
|
-
-p, --plan=plan path to plan to insert multiple data
|
|
523
|
+
-p, --plan=<value> path to plan to insert multiple data
|
|
537
524
|
files that have master-detail
|
|
538
525
|
relationships
|
|
539
|
-
|
|
540
|
-
-u, --targetusername=targetusername username or alias for the target
|
|
526
|
+
-u, --targetusername=<value> username or alias for the target
|
|
541
527
|
org; overrides default target org
|
|
542
|
-
|
|
543
|
-
--apiversion=apiversion override the api version used for
|
|
528
|
+
--apiversion=<value> override the api version used for
|
|
544
529
|
api requests made by this command
|
|
545
|
-
|
|
546
530
|
--confighelp display schema information for the
|
|
547
531
|
--plan configuration file to stdout;
|
|
548
532
|
if you use this option, all other
|
|
549
533
|
options except --json are ignored
|
|
550
|
-
|
|
551
534
|
--json format output as json
|
|
552
|
-
|
|
553
535
|
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
|
|
554
536
|
this command invocation
|
|
555
537
|
|
|
556
538
|
DESCRIPTION
|
|
539
|
+
import data into an org
|
|
540
|
+
|
|
557
541
|
IMPORTANT: Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained
|
|
558
542
|
certain terms to avoid any effect on customer implementations.
|
|
559
543
|
|
|
560
544
|
Imports data into an org using the SObject Tree Save API. This data can include master-detail relationships.
|
|
545
|
+
|
|
561
546
|
To generate JSON files for use with force:data:tree:import, run "sfdx force:data:tree:export".
|
|
547
|
+
|
|
562
548
|
The SObject Tree API supports requests that contain up to 200 records. For more information, see the REST API
|
|
563
549
|
Developer Guide:
|
|
564
550
|
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_composite_sobject_tree.htm
|
|
565
551
|
|
|
566
552
|
EXAMPLES
|
|
567
|
-
sfdx force:data:tree:import -f Contact.json,Account.json -u me@my.org
|
|
568
|
-
|
|
553
|
+
$ sfdx force:data:tree:import -f Contact.json,Account.json -u me@my.org
|
|
554
|
+
|
|
555
|
+
$ sfdx force:data:tree:import -p Account-Contact-plan.json -u me@my.org
|
|
569
556
|
```
|
|
570
557
|
|
|
571
|
-
_See code: [src/commands/force/data/tree/import.ts](https://github.com/salesforcecli/plugin-data/blob/
|
|
558
|
+
_See code: [src/commands/force/data/tree/import.ts](https://github.com/salesforcecli/plugin-data/blob/v2.0.0/src/commands/force/data/tree/import.ts)_
|
|
572
559
|
|
|
573
560
|
<!-- commandsstop -->
|