The API calls I know of that add a record to a multi-value custom field, don't return the ID of the added record (which you can then use to access the value for the specific record in the form custom_XXX_YY). Is there another way of finding it?
$ drush cvapi CustomValue.create entity_id=154621 custom_368=Test Array ( [is_error] => 0 [version] => 3 [count] => 1 [values] => 1 ) $ drush cvapi Contact.setvalue id=154621 field=custom_368 value=test Array ( [is_error] => 0 [version] => 3 [count] => 2 [values] => Array ( [id] => 154621 [custom_368] => test ) ) $ drush cvapi Contact.create custom_368= id=154621 Array ( [is_error] => 0 [version] => 3 [count] => 1 [id] => 154621 [values] => Array (  => Array ( [id] => 154621 [contact_type] => Individual ... snipped ... [modified_date] => 2015-05-14 11:20:56 ) ) )
In our custom frontend I want to have an 'Add new qualification' link, which creates a record in the appropriate custom field group and then adds the set of fields to the form. The screen size occupied by a set of fields for one qualification is such that I don't want to always have a blank set of fields on the screen for adding a new record, before I've clicked the link. The record's row ID is necessary to add the form fields so they know which record they apply to. Each field is 'inline editable' / sends an update call immediately.