Details
-
Type: Sub-task
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.4.0
-
Fix Version/s: None
-
Component/s: CiviCRM API, CiviHR
-
Labels:None
Description
When saving an entity with the API's "create" action, one can do an "insert or update" – e.g. if the ID is specified, then it will update the existing record. But this only works for the entity's primary-key – it doesn't work for business-keys (such as "name" or "email" or "contact_id+location_type_id" or "option_group_id+name"), so one needs to write boilerplate to lookup the ID. The "options.match" will provide a sugary way to update existing records without explicitly knowing the ID#.
(In support of CRM-13187)