Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy can't I update these custom fields in Salesforce?
    primarykey
    data
    text
    <p>Greetings, Well I am bewildered. I have been tasked with updating a PHP script that uses the BulkAPI to upsert some data into the Opportunity entity.</p> <p>This is all going well except that the Bulk API is returning this error for some clearly defined custom fields:</p> <pre><code>InvalidBatch : Field name not found : cv__Acknowledged__c </code></pre> <p>And similar. </p> <p>I thought I finally found the problem when I discovered the WSDL version I was using was quite old (Partner WSDL). So I promptly regenerated the WSDL. Only problem? Enterprise, Partner, etc....all of them...do not include these fields. They're all coming from the Common Ground package and start with cv_</p> <p>I even tried to find them in the object explorer in Workbench as well as the schema explorer in Force.com IDE.</p> <p>So, please...lend me your experience. How can I update these values?</p> <p>Thanks in advance!</p> <p>Clif</p> <p><strong>Screenshots to prove I have the correct access:</strong> <img src="https://i.stack.imgur.com/RAwAE.png" alt="alt text"> <img src="https://i.stack.imgur.com/XljAX.png" alt="alt text"> <img src="https://i.stack.imgur.com/pKPqK.png" alt="alt text"></p> <p><strong>EDIT -- Here is my code:</strong></p> <pre><code>require_once 'soapclient/SforcePartnerClient.php'; require_once 'BulkApiClient.php'; $mySforceConnection = new SforcePartnerClient(); $mySoapClient = $mySforceConnection-&gt;createConnection(APP.'plugins'.DS.'salesforce_bulk_api_client'.DS.'vendors'.DS.'soapclient'.DS.'partner.wsdl.xml'); $mylogin = $mySforceConnection-&gt;login('redacted@redacted.com', 'redactedSessionredactedPassword'); $myBulkApiConnection = new BulkApiClient($mylogin-&gt;serverUrl, $mylogin-&gt;sessionId); $job = new JobInfo(); $job-&gt;setObject('Opportunity'); $job-&gt;setOpertion('upsert'); $job-&gt;setContentType('CSV'); $job-&gt;setConcurrencyMode('Parallel'); $job-&gt;setExternalIdFieldName('Id'); $job = $myBulkApiConnection-&gt;createJob($job); $batch = $myBulkApiConnection-&gt;createBatch($job, $insert); $myBulkApiConnection-&gt;updateJobState($job-&gt;getId(), 'Closed'); $times = 1; while($batch-&gt;getState() == 'Queued' || $batch-&gt;getState() == 'InProgress') { $batch = $myBulkApiConnection-&gt;getBatchInfo($job-&gt;getId(), $batch-&gt;getId()); sleep(pow(1.5, $times++)); } $batchResults = $myBulkApiConnection-&gt;getBatchResults($job-&gt;getId(), $batch-&gt;getId()); echo "Number of records processed: " . $batch-&gt;getNumberRecordsProcessed() . "\n"; echo "Number of records failed: " . $batch-&gt;getNumberRecordsFailed() . "\n"; echo "stateMessage: " . $batch-&gt;getStateMessage() . "\n"; if($batch-&gt;getNumberRecordsFailed() &gt; 0 || $batch-&gt;getNumberRecordsFailed() == $batch-&gt;getNumberRecordsProcessed()) { echo "Failures detected. Batch results:\n".$batchResults."\nEnd batch.\n"; } </code></pre> <p>And lastly, an example of the CSV data being sent:</p> <pre><code>"Id","AccountId","Amount","CampaignId","CloseDate","Name","OwnerId","RecordTypeId","StageName","Type","cv__Acknowledged__c","cv__Payment_Type__c","ER_Acknowledgment_Type__c" "#N/A","0018000000nH16fAAC","100.00","70180000000nktJ","2010-10-29","Gary Smith $100.00 Single Donation 10/29/2010","00580000001jWnq","01280000000F7c7AAC","Received","Individual Gift","Not Acknowledged","Credit Card","Email" "#N/A","0018000000nH1JtAAK","30.00","70180000000nktJ","2010-12-20","Lisa Smith $30.00 Single Donation 12/20/2010","00580000001jWnq","01280000000F7c7AAC","Received","Individual Gift","Not Acknowledged","Credit Card","Email" </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload