简体   繁体   English

尝试使用Beatbox访问Salesforce API时需要REQUIRED_FIELD_MISSING

[英]REQUIRED_FIELD_MISSING when trying to access the Salesforce API with beatbox

I am using beatbox to access the SOAP API of Salesforce. 我正在使用beatbox访问Salesforce的SOAP API。 More specifically, I am trying to convert a Lead using convertLead like so 更具体地说,我试图像这样使用convertLead转换Lead

# Assuming soap_client is a PythonClient already logged in and
# lead is a Lead object.

response = soap_client.convertLead({
    'leadId': lead.pk,
    'convertedStatus': "Qualified - converted",
})

According to the documentation this endpoint should not need any more parameter than leadId and convertedStatus , however the response contains the following error message 根据文档,此终结点不需要比leadIdconvertedStatus更多的参数,但是响应包含以下错误消息

System.DmlException: Insert failed. System.DmlException:插入失败。 First exception on row 0; 第0行为第一个例外; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Company_Name__c]: [Company_Name__c] (System Code)UNKNOWN_EXCEPTION00Qg0000003Er0pEACfalse 第一个错误:REQUIRED_FIELD_MISSING,必填字段缺失:[Company_Name__c]:[Company_Name__c](系统代码)UNKNOWN_EXCEPTION00Qg0000003Er0pEACfalse

It is good to mention that lead (the Lead object to be converted) actually contains a non empty Company field. 值得一提的是, lead (要转换的Lead对象)实际上包含一个非空的Company字段。

Any idea of what could cause this error message? 是否知道可能导致此错误消息的原因? I tried to specifically add a companyName field to the API call but it did not help. 我试图专门向API调用添加一个companyName字段,但它没有帮助。

As per your explanation you are getting the error of Required fields are missing (Company_Name__c) and you tried to assign the value to this "companyName" field, But you are getting error for custom field not standard salesforce field. 按照您的解释,您会收到“必填”字段缺失的错误(Company_Name__c),并且尝试将值分配给此“ companyName”字段,但是对于自定义字段而不是标准salesforce字段却遇到了错误

So i think when you are converting it, then may be some account / contact custom field is required [Required fields are missing: [Company_Name__c]]. 因此,我认为当您进行转换时,可能需要一些帐户/联系人自定义字段[必填字段缺失:[Company_Name__c]]。 So you need to assign value of that field explicitly in your code. 因此,您需要在代码中显式分配该字段的值。

If you want to map the custom field then please check below link : 如果要映射自定义字段,请检查以下链接:

https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_mapleads.htm&language=en https://help.salesforce.com/apex/HTViewHelpDoc?id=customize_mapleads.htm&language=en

Otherwise if you did not want to check required field on lead conversion then you can disable that using following steps : 1. Login to your salesforce org. 否则,如果您不想检查潜在客户转换的必填字段,则可以使用以下步骤禁用该字段:1.登录到salesforce组织。 2. Setup 3. Customize 4. Leads 5. Settings 6. Edit and uncheck the "Require Validation for Converted Leads". 2.设置3.自定义4.线索5.设置6.编辑并取消选中“需要验证转换后的线索”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python salesforce beatbox:beatbox._beatbox.SoapFaultError:'INVALID_FIELD' - python salesforce beatbox: beatbox._beatbox.SoapFaultError: 'INVALID_FIELD' 调用此Beatbox API时,为什么Salesforce中会有幻影/随机帐户? - Why are there ghost/random accounts in salesforce when calling this beatbox API? 通过Beatbox,Python将附件上载到Salesforce API - Uploading Attachments to Salesforce API via Beatbox, Python 与Salesforce联络时,如果我在Beatbox API中将Id作为externalIdFieldName传递Id,则会引发错误 - upsert throws error when I pass Id as externalIdFieldName in Beatbox API while contacting Salesforce 尝试通过API将成员添加到Google群组时,获取“缺少必填字段:成员” - Getting 'Missing required field: member' when trying to add a member to a google group via API 如何使用Beatbox python API从Salesforce中提取原始数据 - How to extract raw data from Salesforce using Beatbox python API 获取Salesforce Lead的URL(Python Beatbox SOAP API) - Get URL for Salesforce Lead (Python Beatbox SOAP API) salesforce python Beatbox 导入错误 - salesforce python Beatbox import error Python beatbox salesforce外部Id upsert - Python beatbox salesforce external Id upsert 如何使用Beatbox或simple-salesforce在Salesforce中创建自定义表格? - How to create a custom table in Salesforce using Beatbox or simple-salesforce?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM