maton salesforce record create
maton salesforce record create [flags]
Create a record (POST /sobjects/{type}) when –data is a JSON object, or up to 200 records (POST /composite/sobjects) when –data is a JSON array. In array mode each record must include its own attributes.type and the –type flag is ignored; pass –all-or-none to roll back the whole batch if any record fails.
Options
-
--all-or-none - Batch only: roll back the entire batch if any record fails
-
--connection <string> - Connection ID to route through (Maton-Connection header)
-
--data <string> - Record fields as JSON object, or JSON array of records for batch
-F,--data-file <string>- Read JSON record fields from a file (use - for stdin)
-
--dry-run - Print the request that would be sent without executing it
-q,--jq <expression>- Filter JSON output using a jq expression
-
--json - Output raw JSON
-
--paginate - Follow next_cursor and concatenate all pages (list commands only)
-t,--template <string>- Format JSON output using a Go template; see "maton help formatting"
-
--type <string> - sObject type (required when --data is a JSON object; ignored when array)
Options inherited from parent commands
-p,--profile <string>- Profile to use for this invocation (overrides the active profile; also reads MATON_PROFILE)
Examples
$ maton salesforce record create --type Contact --data '{"FirstName":"John","LastName":"Doe"}'
$ maton salesforce record create --type Account --data-file account.json
$ cat account.json | maton salesforce record create --type Account -F -
$ maton salesforce record create -F records.json
$ maton salesforce record create --all-or-none -F records.json