• ffaadmin
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

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);
}