外键 – CANNOT_UPDATE_CONVERTED_LEAD,无法引用转换后的引线:[Lead__c]

外键 – CANNOT_UPDATE_CONVERTED_LEAD,无法引用转换后的引线:[Lead__c],第1张

概述当我尝试将自定义对象放入现有的主角对象时,我收到一条错误消息. 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 当我尝试将自定义对象放入现有的主角对象时,我收到一条错误消息.

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

总结

以上是内存溢出为你收集整理的外键 – CANNOT_UPDATE_CONVERTED_LEAD,无法引用转换后的引线:[Lead__c]全部内容,希望文章能够帮你解决外键 – CANNOT_UPDATE_CONVERTED_LEAD,无法引用转换后的引线:[Lead__c]所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1221881.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-05
下一篇 2022-06-05

发表评论

登录后才能评论

评论列表(0条)

保存