function sf_import_manual in Salesforce Suite 6.2
Page callback for Manual imports. Allow a user to specify a list of Salesforce IDs for importing from Salesforce to Drupal.
Parameters
array &$form_state:
1 string reference to 'sf_import_manual'
- sf_import_menu in sf_import/
sf_import.module - Implementation of hook_menu().
File
- sf_import/
sf_import.admin.inc, line 300 - Admin settings for the SF Import module.
Code
function sf_import_manual(&$form_state) {
$form = array();
$fieldmaps = salesforce_api_salesforce_field_map_load_all();
$maps = array();
foreach ($fieldmaps as $map) {
$maps[$map->name] = !empty($map->description) ? $map->description : $map->name;
}
$form['fieldmap'] = array(
'#type' => 'select',
'#title' => t('Fieldmap to use for import'),
'#options' => $maps,
'#required' => TRUE,
'#description' => t('Select a fieldmap to use for importing the SFIDs to Drupal.'),
);
$form['sfids'] = array(
'#title' => t('Salesforce IDs'),
'#type' => 'textarea',
'#required' => TRUE,
'#description' => t('Enter a list of Salesforce IDs, one per line, that you would like to import from Salesforce to Drupal.'),
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Import',
);
return $form;
}