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 specifying the new field values, use the format =. 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.
API name of the Salesforce or Tooling API object that contains the record you're updating.
ID of the record you’re updating.
List of = pairs that identify the record you want to update.
Use Tooling API so you can update a record in a Tooling API object.
Fields that you're updating, in the format of = pairs.
-
Update the Name field of an Account record with the specified (truncated) ID:
<%= config.bin %> <%= command.id %> --sobject Account --record-id 001D0 --values "Name=NewAcme"
-
Update the Name field of an Account record whose current name is 'Old Acme':
<%= config.bin %> <%= command.id %> --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:
<%= config.bin %> <%= command.id %> --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:
<%= config.bin %> <%= command.id %> -t --sobject TraceFlag --record-id 7tf170000009cUBAAY --values "ExpirationDate=2017-12-01T00:58:04.000+0000"
Successfully updated record: %s.
Failed to update record. %s
Failed to update record with code %s. Message: %s. Fields: %s.