Why can't I update these custom fields in Salesforce?

Hi, I'm confused. I was instructed to update a PHP script that uses BulkAPI to update some data in an Opportunity object.

Everything is going well, except that the Bulk API returns this error for some well-defined custom fields:

InvalidBatch : Field name not found : cv__Acknowledged__c

And it seems.

I thought I finally found the problem when I found that the version of WSDL that I used was pretty old (Partner WSDL). So I quickly updated WSDL. Just a problem? Enterprise, Partner, etc ... all of them ... do not include these fields. They all come from the Common Ground package and start with cv _

I even tried to find them in the object explorer in Workbench, as well as in the diagram explorer in the Force.com IDE.

So please ... give me your experience. How can I update these values?

Thanks in advance!

Cliff

Screenshots to prove that I have the correct access: alt textalt textalt text

EDIT is my code:

require_once 'soapclient/SforcePartnerClient.php';
        require_once 'BulkApiClient.php';

        $mySforceConnection = new SforcePartnerClient();
        $mySoapClient = $mySforceConnection->createConnection(APP.'plugins'.DS.'salesforce_bulk_api_client'.DS.'vendors'.DS.'soapclient'.DS.'partner.wsdl.xml');

        $mylogin = $mySforceConnection->login('redacted@redacted.com', 'redactedSessionredactedPassword');

        $myBulkApiConnection = new BulkApiClient($mylogin->serverUrl, $mylogin->sessionId);

        $job = new JobInfo();
        $job->setObject('Opportunity');
        $job->setOpertion('upsert');
        $job->setContentType('CSV');
        $job->setConcurrencyMode('Parallel');
        $job->setExternalIdFieldName('Id');
        $job = $myBulkApiConnection->createJob($job);

        $batch = $myBulkApiConnection->createBatch($job, $insert);

        $myBulkApiConnection->updateJobState($job->getId(), 'Closed');

        $times = 1;
        while($batch->getState() == 'Queued' || $batch->getState() == 'InProgress')
        {
            $batch = $myBulkApiConnection->getBatchInfo($job->getId(), $batch->getId());
            sleep(pow(1.5, $times++));
        }

        $batchResults = $myBulkApiConnection->getBatchResults($job->getId(), $batch->getId());

        echo "Number of records processed: " . $batch->getNumberRecordsProcessed() . "\n";
        echo "Number of records failed: " . $batch->getNumberRecordsFailed() . "\n";
        echo "stateMessage: " . $batch->getStateMessage() . "\n";

        if($batch->getNumberRecordsFailed() > 0 || $batch->getNumberRecordsFailed() == $batch->getNumberRecordsProcessed())
        {
            echo "Failures detected. Batch results:\n".$batchResults."\nEnd batch.\n";
        }

And finally, an example of sending CSV data:

"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"
+3
source share
3 answers

After 2 weeks, 4 cases, dozens of emails and phone calls, 3 messages on the bulletin board and 1 question with Stackoverflow, I finally got a solution.

In the end, the problem was pretty simple. (which makes all this even more unpleasant)

As indicated, the custom fields that I tried to update live in the Convio Common Ground package. Apparently, our installation has 2 licenses for this package. None of the licenses have been assigned to my user account.

, /, , API. , .

, " " . , , .

alt text

SimonF : http://boards.developerforce.com/t5/Perl-PHP-Python-Ruby-Development/Bulk-API-So-frustrated/m-p/232473/highlight/false#M4713

+8

, . ? , , , , , .

0

, FLS, , . , API ( ).

, . , . salesforce:

1.) The package definition page. It should have information about which version of the package was used when the package was first installed and which version of the package you are now.

2.) A page that has WSDL generation links. If you decide to create an enterprise WSDL, you should go to the page with drop-down elements that will allow you to choose which version of the package to use. Try playing with them to see if you can open the fields.

This is just a hunch. If you find more information, let me know and I can try to provide additional recommendations.

0
source

Source: https://habr.com/ru/post/1781391/


All Articles