外键 – CANNOT_UPDATE_CONVERTED_LEAD,无法引用转换后的引线:[
发布时间:2020-12-16 10:40:07 所属栏目:百科 来源:网络整理
导读:当我尝试将自定义对象放入现有的主角对象时,我收到一条错误消息. ListLead 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; //s
当我尝试将自定义对象放入现有的主角对象时,我收到一条错误消息.
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列 即使我注释掉’update existing_lead’,我也会收到类似的错误消息. 554 System.DmlException:插入失败.第0行的第一个例外;第一个错误:CANNOT_UPDATE_CONVERTED_LEAD,无法引用转换后的引线:[Lead__c] Class.ProcessContact.handleInboundEmail:第82行,第9列 我将不胜感激任何建议. 问候 解决方法
此错误表示潜在客户记录已转换为联系人.转换后,无法更新潜在客户记录. Lead对象具有IsConverted属性,您可以检查它是否已转换.如果IsConverted为true,则ConvertedContactId将保留新联系人记录的联系人ID.
Lead Object reference (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |