data update record

Updates a single record of a Salesforce or Tooling API object.

Description for data update record 

Specify the record you want to update with either its ID or with a list of field-value pairs that identify the record. If your list of fields identifies more than one record, the update fails; the error displays how many records were found.

When using field-value pairs for both identifying the record and specifiyng the new field values, use the format <fieldName>=<value>. Enclose all field-value pairs in one set of double quotation marks, delimited by spaces. Enclose values that contain spaces in single quotes.

This command updates a record in Salesforce objects by default. Use the –use-tooling-api flag to update a Tooling API object.

Aliases for data update record 

force:data:record:update

Flags 

Flag Name (Long)Flag Name (Short)Description
‑‑api‑versionN/AType: Value

Override the api version used for api requests made by this command
‑‑flags‑dirN/AType: Value

Import flag values from a directory.
‑‑jsonN/AType: Boolean

Format output as json.
‑‑record‑id‑iType: Value

ID of the record you’re updating.
‑‑skip‑assignment‑rulesN/AType: Boolean

Don’t apply active assignment rules when updating the record; applies to Account, Case, and Lead records.
‑‑sobject‑sType: Value
Required

API name of the Salesforce or Tooling API object that contains the record you’re updating.
‑‑target‑org‑oType: Value
Required

Username or alias of the target org. Not required if the target-org configuration variable is already set.
‑‑use‑tooling‑api‑tType: Boolean

Use Tooling API so you can update a record in a Tooling API object.
‑‑values‑vType: Value
Required

Fields that you’re updating, in the format of <fieldName>=<value> pairs.
‑‑where‑wType: Value

List of <fieldName>=<value> pairs that identify the record you want to update.

Examples for data update record 

Update the Name field of an Account record with the specified (truncated) ID:

1sf data update record --sobject Account --record-id 001D0 --values "Name=NewAcme"

Update the Name field of an Account record whose current name is ‘Old Acme’:

1sf data update record --sobject Account --where "Name='Old Acme'" --values "Name='New Acme'"

Update the Name and Website fields of an Account record with the specified (truncated) ID:

1sf data update record --sobject Account --record-id 001D0 --values "Name='Acme III' Website=www.example.com"

Update the ExpirationDate field of a record of the Tooling API object TraceFlag using the specified (truncated) ID:

1sf data update record -t --sobject TraceFlag --record-id 7tf170000009cUBAAY --values "ExpirationDate=2017-12-01T00:58:04.000+0000"