You are here

function salesforce_api_fieldmap_clone_form_submit in Salesforce Suite 7.2

Same name and namespace in other branches
  1. 5.2 salesforce_api/ \salesforce_api_fieldmap_clone_form_submit()
  2. 6.2 salesforce_api/ \salesforce_api_fieldmap_clone_form_submit()

Submit handler for the fieldmap clone form.


salesforce_api/, line 537
Contains the admin page callbacks for the Salesforce module, including forms for general settings and fieldmap administration.


function salesforce_api_fieldmap_clone_form_submit($form, &$form_state) {

  // Clone the specified fieldmap.
  $map = salesforce_api_fieldmap_clone($form_state['values']['fieldmap_index']);
  if ($map) {

    // Display a message and return to the admin screen.
    drupal_set_message(t('Fieldmap cloned successfully.'));
    $form_state['redirect'] = SALESFORCE_PATH_FIELDMAPS . '/' . $map->name . '/edit';
  else {
    drupal_set_message(t('Failed to clone fieldmap.'), 'error');