我得到的錯誤消息時,我嘗試instert自定義對象到exisiting引線對象。CANNOT_UPDATE_CONVERTED_LEAD,不能引用轉換鉛:[Lead__c]
List<Lead> leads =[select Id from Lead where Email =:lead.Email ];
if(leads.size()>0)
{
Lead existing_lead = new Lead(Id = leads[0].id);
social_account.Lead__c = existing_lead.Id; //social_account is a custom object that
//has a child relationship to lead.
//ie lead is a parent of social_accounts.
update existing_lead;
insert social_account; //if there is an existing lead with same same email,
//i'd like to insert new social_account to an exsiting lead.
}
我收到此錯誤:
554 System.DmlException:更新失敗。行0上的第一個例外,ID爲00Q3000000WW3isEAD;第一誤差:CANNOT_UPDATE_CONVERTED_LEAD,不能引用轉換鉛:[]
Class.ProcessContact.handleInboundEmail:線81,第9欄第 外部入口點
即使我註釋掉 '更新existing_lead',我得到類似的錯誤信息。
554 System.DmlException:插入失敗。第0行的第一個例外;第一誤差:CANNOT_UPDATE_CONVERTED_LEAD,不能引用轉換鉛:[Lead__c]
Class.ProcessContact.handleInboundEmail:線82,第9欄第 外部入口點
我希望任何建議。
關於