You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.
@eileenmcnaughton has requested an action that can add or update multiple records in one api request. This would basically be what the Replace action does but without the delete part. I propose the action be named Save with a signature like:
civicrm_api4('Email', 'save', [
'records' => [
['id' => 123, 'email' => '[email protected]'], // will update because id provided
['email' => '[email protected]', 'conact_id' => 456, 'location_type_id' => 1], // will create
],
]);
Available parameters would be:
records: array of records to save (see above example)
reload: whether to force-reload all records to return in api results
defaults: default values to set for all new records being created (saves repetition in the records param)
The text was updated successfully, but these errors were encountered:
@colemanw in the process of doing bulkCreate I found it really helpful to have a defaults param - ie if I create 5 fields with largely the . same params I passed this last in as $defaults & it applied to all
@eileenmcnaughton has requested an action that can add or update multiple records in one api request. This would basically be what the
Replace
action does but without the delete part. I propose the action be namedSave
with a signature like:Available parameters would be:
records
param)The text was updated successfully, but these errors were encountered: