Zoho CRM具有内置功能,可使用用户定义的数据扩展自定义字段。 有没有办法通过API获取这些值?
根据API documendation,只有以下条目可用:
和develope可以通过url查询它们:
https://crm.zoho.com/crm/private/xml/[[EntryName]]/getRecords?newFormat=1&authtoken=[[AuthToken]]&scope=crmapi
我正在构建一个允许创建新潜在客户的自定义应用,客户希望能够在我的应用中编辑潜在客户来源。
如何获取“潜在客户来源”字段的现有值?
ps:我知道我可以查询所有潜在客户,获取字段值,但这不是解决方案。
答案 0 :(得分:1)
答案是使用此API方法
https://zohocrmapi.wiki.zoho.com/getFields.html
<强>目的强>
您可以使用getFields方法获取特定模块中可用字段的详细信息。
请求网址
XML:https://crm.zoho.com/crm/private/xml/Tasks/getFields?authtoken=AuthToken&scope=crmapi
JSON:https://crm.zoho.com/crm/private/json/Tasks/getFields?authtoken=AuthToken&scope=crmapi
示例回复
<Leads>
<section name="Lead Information" dv="Lead Information">
<FL req="false" type="Lookup" isreadonly="false" maxlength="120" label="Lead Owner" dv="Lead Owner" customfield="false" />
<FL req="true" type="Text" isreadonly="false" maxlength="100" label="Company" dv="Company" customfield="false" />
<FL req="false" type="Text" isreadonly="false" maxlength="40" label="First Name" dv="First Name" customfield="false" />
<FL req="true" type="Text" isreadonly="false" maxlength="80" label="Last Name" dv="Last Name" customfield="false" />
<FL req="false" type="Text" isreadonly="false" maxlength="100" label="Designation" dv="Title" customfield="false" />
<FL req="false" type="Email" isreadonly="false" maxlength="100" label="Email" dv="Email" customfield="false" />
<FL req="false" type="Phone" isreadonly="false" maxlength="30" label="Phone" dv="Phone" customfield="false" />
<FL req="false" type="Text" isreadonly="false" maxlength="30" label="Fax" dv="Fax" customfield="false" />
<FL req="false" type="Phone" isreadonly="false" maxlength="30" label="Mobile" dv="Mobile" customfield="false" />
<FL req="false" type="Website" isreadonly="false" maxlength="120" label="Website" dv="Website" customfield="false" />
...
<section name="Address Information" dv="Address Information">
<FL req="false" type="Text" isreadonly="false" maxlength="250" label="Street" dv="Street" customfield="false" />
<FL req="false" type="Text" isreadonly="false" maxlength="30" label="City" dv="City" customfield="false" />
<FL req="false" type="Text" isreadonly="false" maxlength="30" label="State" dv="State" customfield="false" />
<FL req="false" type="Text" isreadonly="false" maxlength="30" label="Zip Code" dv="Zip Code" customfield="false" />
<FL req="false" type="Text" isreadonly="false" maxlength="30" label="Country" dv="Country" customfield="false" />
</section>
<section name="Description Information" dv="Description Information">
<FL req="false" type="TextArea" isreadonly="false" maxlength="32000" label="Description" dv="Description" customfield="false" />
</section>
</Leads>
和元素 FL [@ label ='Lead Source'] 是我要找的结果:
<FL req="false" type="Pick List" isreadonly="false" maxlength="120" label="Lead Source" dv="Lead Source" customfield="false">
<val>-None-</val>
<val default="true">Advertisement</val>
<val>Cold Call</val>
<val>Employee Referral</val>
<val>External Referral</val>
<val>OnlineStore</val>
<val>Partner</val>
<val>Public Relations</val>
<val>Sales Mail Alias</val>
<val>Seminar Partner</val>
<val>Seminar-Internal</val>
<val>Trade Show</val>
<val>Web Download</val>
<val>Web Research</val>
<val>4444</val>
</FL>
问题是我在对象上测试了这个方法,它没有PickupList字段,我决定它只返回定义,但不返回可用值。