data update record

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

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.

force:data:record:update

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.
‑‑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.

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

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

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

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