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
ffaadminffaadmin 

UNAVAILABLE_RECORDTYPE_EXCEPTION The appropriate default record type could not be found.

What does this error mean and how do you fix it?

 

 

UNAVAILABLE_RECORDTYPE_EXCEPTIONThe appropriate default record type could not be found.

 

 

I'm simply trying to convert a lead.

 

 

$sql_get_orders = db_query('SELECT o.order_id, o.customer_id, c.sforce_id FROM orders o, customers c WHERE o.customer_id < 10 and o.customer_id = c.customer_id and c.sforce_id != "";');
while ($o = mysql_fetch_array($sql_get_orders)) {
 // convert our lead to account
 $leadConvert = new stdClass();
 $leadConvert->leadId = $o['sforce_id'];
 $leadConvert->convertedStatus = 'Qualified';
 $leadConvert->doNotCreateOpportunity = true;
 $leadConvert->overwriteLeadSource = false;
 $leadConvert->sendNotificationEmail = false;
 $result = $crmHandle->convertLead($leadConvert);
 var_dump($result);
}

 

SFDCConsultant.ax449SFDCConsultant.ax449

Good day,

 

Did you find a solution to this problem?  I am having the same issue.

 

Thank you,

Michael