Skip to main content
Eduardo Arturo Monroy Juárez 님이 #Data Management에 질문했습니다
I'm doing masive creation of contact objects,  in the process sometimes fail one or more of my data and then SALESFORCE does a rollback. I´m using the SALESFORCE PHP API in version 20.
답변 1개
  1. 9월 23일 오후 2:46

    Hi Eduardo,

    If you're using the Salesforce PHP Toolkit, you can control this with the SOAP API AllOrNoneHeader. 

     

    By default, the API can roll back the entire create() operation when one or more records fail. If you want successful records to be committed while only the failed records are returned as errors, set allOrNone to false. 

     

    For example, depending on the PHP Toolkit version, the call is typically along these lines:

    $result = $client->create($records, array('AllOrNoneHeader' => array('allOrNone' => false))); 

     

    The exact method signature can vary between PHP Toolkit versions, so check the generated SforceClient method for API v20. 

     

    If you want the whole batch to succeed or fail together, leave allOrNone as true. 

0/9000