答案是使用这个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 字段的对象上测试了这个方法,我决定它只返回定义,但不返回可用值。