Get Fields in Zoho CRM V8

Note:

  • Each time the zoho.crm.v8.getFields integration task is executed, it triggers an API request in the back-end. This call is deducted from the external calls limit available for the service from which the task is executed, based on your pricing plan.
  • Only actual executions that receive a response (whether success or failure) are counted, not the number of times the task appears in the script. For example, if zoho.crm.v8.getFields integration task is placed inside a for each task that iterates five times, the number of external calls consumed will be five, even though the task appears only once in the script. 

Overview

This task is used to fetch metadata of all fields from the specified Zoho CRM module.

Syntax

<variable> = zoho.crm.v8.getFields(<module_name>, <connection>);

where,

ParameterData typeDescription
<variable>KEY-VALUEHolds the response returned by Zoho CRM on successful task execution or error details on failure.
<module_name>TEXTRepresents the API name of the Zoho CRM module from where the field details will be fetched.
<connection>TEXT

Represents the link name of the connection which is connected to your Zoho CRM account.

Note:

Example : Retrieve the list of fields under Leads module

The following script retrieves the list of fields available in a Contacts module, along with their properties.

response = zoho.crm.v8.getFields("Contacts","crm_connection");

where,

response
is the variable which holds the response returned by Zoho CRM.
"Contacts"
is the TEXT that represents the API name of the module from which field details are to be fetched.
"crm_connection"
is the TEXT that represents the link name of the connection.

Response Format

Success Response

  • The sample success response returned is of the following format:
{
   "fields":[
     {
       "associated_module":null,
       "webhook":true,
       "operation_type":{
         "web_update":true,
         "api_create":true,
         "web_create":true,
         "api_update":true
       },
       "colour_code_enabled_by_system":false,
       "field_label":"Contact Owner",
       "tooltip":null,
       "display_format_properties":null,
       "type":"used",
       "field_read_only":true,
       "customizable_properties":[
         "field_of_lookup"
       ],
       "display_label":"Contact Owner",
       "read_only":false,
       "association_details":null,
       "businesscard_supported":true,
       "multi_module_lookup":{
         
       },
       "id":"5038512000000000437",
       "created_time":null,
       "filterable":true,
       "visible":true,
       "profiles":[
         {
           "permission_type":"read_write",
           "name":"Administrator",
           "id":"5038512000000015972"
         },
         {
           "permission_type":"read_write",
           "name":"Standard",
           "id":"5038512000000015975"
         }
       ],
       "view_type":{
         "view":true,
         "edit":true,
         "quick_create":false,
         "create":true
       },
       "separator":false,
       "searchable":true,
       "history_tracking_enabled":false,
       "external":null,
       "api_name":"Owner",
       "parent_field":null,
       "unique":{
         
       },
       "enable_colour_code":false,
       "child_fields":null,
       "pick_list_values":[
         
       ],
       "system_mandatory":false,
       "virtual_field":false,
       "json_type":"jsonobject",
       "crypt":null,
       "range":null,
       "created_source":"default",
       "display_type":-1,
       "ui_type":8,
       "modified_time":null,
       "public":false,
       "email_parser":{
         "fields_update_supported":false,
         "record_operations_supported":false
       },
       "currency":{
         
       },
       "custom_field":false,
       "lookup":{
         
       },
       "address":null,
       "rollup_summary":{
         
       },
       "length":120,
       "column_name":"SMOWNERID",
       "display_field":false,
       "pick_list_values_sorted_lexically":false,
       "sortable":true,
       "layout_associations":[
         {
           "api_name":"Standard__s",
           "name":"Standard",
           "id":"5038512000000095059"
         }
       ],
       "global_picklist":null,
       "display_format":null,
       "history_tracking":null,
       "data_type":"ownerlookup",
       "formula":{
         
       },
       "decimal_place":null,
       "mass_update":false,
       "multiselectlookup":{
         
       },
       "auto_number":{
         
   }

Failure Response

  • The failure response returned for incorrect or non-existent module API name, is of the following format:
{
 "code": "INVALID_MODULE",
 "details": { },
 "message": "the module name given seems to be invalid",
 "status": "error"
}