odata_upsert_rows
Idempotent import of rows into any entity via OData: PATCH when the record exists (matched by keyFields), otherwise POST. Safe to re-run -- duplicates are updated, not re-created. Best for small-to-medium transactional loads (e.g. <= a few thousand rows). For bulk loads use dmf_import_file. Provide rows as a JSON array of objects; resolve key fields from the KB (get_data_entity_info) -- do not guess them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rowsJson | Yes | JSON array of row objects, e.g. [{"CustomerAccount":"C0001","Name":"Acme"}]. | |
| entitySet | Yes | OData public entity set name, e.g. 'CustomersV3'. | |
| keyFields | Yes | Comma-separated business key fields used to detect existing records, e.g. 'CustomerAccount' or 'dataAreaId,ItemNumber'. | |
| legalEntity | No | Optional legal entity (dataAreaId) injected into each row when absent. | |
| crossCompany | No | Set true to allow cross-company writes. |