[英]How to set leadsource in Dynamics crm using api?
I have a WordPress website and I am using a Gravity Forms CRM addon to create lead in CRM.我有一个 WordPress 网站,我正在使用 Gravity Forms CRM 插件在 CRM 中创建潜在客户。 I need to set lead source which is a dropdown in crm lead.
我需要设置铅源,它是 crm 铅的下拉菜单。 while sending data to crm (via api) I am getting an error:
在将数据发送到 crm(通过 api)时,我收到一个错误:
System.ArgumentException: Incorrect attribute value type System.String Parameter name: leadsourcecode System.ArgumentException:不正确的属性值类型 System.String 参数名称:leadsourcecode
I tried sending text and number as well but not working.我也尝试发送文本和号码,但没有成功。
The leadsourcecode field receives a Edm.Int32
accourding to WebAPI documentation .所述leadsourcecode字段接收一个
Edm.Int32
accourding到的WebAPI文档。 The following is an example of a create request setting the Lead Source to Advertisement(1):以下是将潜在客户来源设置为广告 (1) 的创建请求示例:
POST /api/data/v9.0/leads
odata-maxversion: 4.0
odata-version: 4.0
accept: application/json
content-type: application/json
{
"subject": "test api 2",
"leadsourcecode": 1
}
You can also review the default options for the field in the same lead entity documentation I mentioned before:您还可以在我之前提到的同一潜在客户实体文档中查看该字段的默认选项:
Value Label
值标签
1 Advertisement
1 广告
2 Employee Referral
2 员工推荐
3 External Referral
3 外部推荐
4 Partner
4 合作伙伴
5 Public Relations
5 公共关系
6 Seminar
6 研讨会
7 Trade Show
7 贸易展
8 Web
8 网页
9 Word of Mouth
9 口碑
10 Other
10 其他
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.