The following code works just fine:
foreach ($all_fields as $fieldset)
{
$sObject->fields = $fieldset;
$result = $client->upsert("sa_id__c", array($sObject));
// The result object will have a field called
// created = true if a record is created
if ($result->success)
{
if ($result->created)
{
$message = "The account: {$fieldset['Name']} has been created from Schedule A\n";
$accounts_created++;
$file_created = "accounts_created.csv";
file_put_contents($file_created, $message, FILE_APPEND);
}
else
{
$message = "The account:{$fieldset['Name']}has been updated from Schedule A\n";
$accounts_updated++;
$file_updated = "accounts_updated.csv";
file_put_contents($file_updated, $message, FILE_APPEND);
}
}
else
{
echo "It did not work<br />";
}
}
But I am trying to add
$fieldset['sa_id__c']
to another column in the CSV file
I have tried everything that I know and cannot get it to work
I want to format to look like this
Account Name SA ID
$fieldset['Name'] $fieldset['sa_id__c']
Can this be done? Can someone look at my code and tell me what I am missing here, please........
TIA
Mike
Adding: I should explain that I tried to add it via this tutorial > http://www.modwest.com/help/kb6-135.html
by adding two columns and adding name and sa_id__c to a continuation of the variable $message