getFields Method

 Purpose

You can use the getFields method to fetch details of the fields available in a particular module.

 Request URL

XML Format:
https://<APPDOMAIN>/crm/private/xml/Tasks/getFields?authtoken=Auth Token&scope=crmapi

JSON Format:
https://<APPDOMAIN>/crm/private/json/Tasks/getFields?authtoken=Auth Token&scope=crmapi

Note:

  • You can change the module name in the request URL to fetch fields from the other modules.

 Auth Token

Auth Token is an encrypted alphanumeric string that is required to authenticate your CRM account credentials. A valid user's Authentication Token is necessary to access the API. When making an API request, send the authentication token in the Authorization header as shown below:

https://<APPDOMAIN>/crm/private/xml/Tasks/getFields?authtoken=Auth Token&scope=crmapi

Header:

Authorization=1000XXXX65.1000XXXX44.caXXXXXXXXXXXX

(See Using Authentication Token )

 Request Parameters

ParameterData TypeDescription
typeString

Specify the value as 1 or 2

  • 1 - To retrieve all fields from the summary view
  • 2 - To retrieve all mandatory fields from the module

Note: Do note specifiy the type, if you want to retrieve all fields from the module.

* - Mandatory parameter

Note:

  • Refer the Release Notes  page to learn more about enhancements made in the API implementation.

 Sample Response

<?xml version="1.0" encoding="UTF-8" ?>
- <Potentials>
  - <section name="Potential Information" dv="Potential Information">
    <FL req="false" type="Lookup" maxlength="120" label="Potential Owner" customfield="false" />
    <FL req="false" type="Currency" maxlength="16" fval="$0.00" label="Amount" customfield="false" />
    <FL req="true" type="Text" maxlength="120" label="Potential Name" customfield="false" />
    <FL req="true" type="Date" maxlength="20" label="Closing Date" customfield="false" />
    <FL req="true" type="Lookup" maxlength="100" label="Account Name" customfield="false" />
    + <FL req="true" type="Pick List" maxlength="100" label="Stage" customfield="false">
    + <FL req="false" type="Pick List" maxlength="120" label="Type" customfield="false">
    <FL req="false" type="Integer" maxlength="3" label="Probability" customfield="false" />
    <FL req="false" type="Text" maxlength="100" label="Next Step" customfield="false" />
    <FL req="false" type="Currency" maxlength="16" fval="$0.00" label="Expected Revenue" customfield="false" />
    + <FL req="false" type="Pick List" maxlength="120" label="Lead Source" customfield="false">
    <FL req="false" type="Lookup" maxlength="50" label="Campaign Source" customfield="false" />
    <FL req="false" type="Lookup" maxlength="50" label="Contact Name" customfield="false" />
    <FL req="false" type="OwnerLookup" maxlength="25" label="Created By" customfield="false" />
    <FL req="false" type="OwnerLookup" maxlength="25" label="Modified By" customfield="false" />
    <FL req="false" type="Text" maxlength="10" label="newfield" customfield="true" />
    </section>
   -<section name="Description Information" dv="Description Information">
    <FL req="false" type="TextArea" maxlength="32000" label="Description" customfield="false" />
</section>
</Potentials>

Additional Notes

  • While retrieving data from your CRM platform account, Field-level security is applied. See Security Administration  for more details.

 Business Scenario

  • Field mapping when integrating with 3rd party apps