function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
uptime_andrewuptime_andrew 

LeadConvert Failing

Hello,

 

I am attempting to use the LeadConvert command and getting errors.

 

We are using the scripts SforceBaseClient.php, SforceHeaderOptions.php and SforcePartnerClient.php scripts, and I downloaded the partner wsdl file with the LeadConvert definition.

 

However, when making the call, I am getting an error:

 

Uncaught SoapFault exception: [soapenv:Client] '' is not valid for type xsd:boolean, should be '0', '1', 'true' or 'false'

 

The code looks like this:

 

        $leadConvert = new LeadConvert(
            $aId,
            $cId,
            $convertedStatus,
            $doNotCreateOpportunity,
            $leadId,
            $opportunityName,
            null,
            null,
            false
        );

        $result = $mySforceConnection->convertLead(array($leadConvert));
 

 

Am I missing something here?  Any thoughts.

 

Thank you 

 

 

Lawrence-CECLawrence-CEC
What are the values you are passing in to new LeadConvert()?
Lawrence-CECLawrence-CEC

It might just be that first null you have in the parameter list... I assume that's the value for 'overwriteLeadSource' which is of type xsd:boolean. 'null' is probably coming through as something other than '0' or 'false'. Try changing that value to false or 0 and see if it works.