Creator Help

Get Related Records

Get Related Records

You can fetch related records from a CRM module in Zoho Creator form using the getRelatedRecords() task. For ex, to get Notes associated with a given Potential id getRelatedRecords task should be used.

Syntax

zoho.crm.getRelatedRecords(<ModuleName>,<PrentModuleName>,<RecordID>,fromIndex,toIndex);

where,
<Module Name> is the name of the CRM module for which you want to fetch the related records.
<ParentModuleName> is the name of the parent module for which you want to fetch the related records. For example, if you want to fetch " Notes" related to a Potential, then "Potentials" is your parent module.
<RecordID> is the ID in CRM based on which the records related to the ID are fetched
<fromIndex>(optional)- Default value - 1
<toIndex> (optional) Default Value- 20 to 200

Example

Resp=zoho.crm.getRelatedRecords("Notes", "Potentials", "747000000047001", 1, 3);

Response from CRM

[
{id=747000000049029, Created Time=2011-10-03 10:15:35, Modified By= srividh, Title=notes8, Modified Time=2011-10-03 10:15:35,
Created By= ZohoTest, Owner Name= ZohoTest},
{id=747000000049027, Created Time=2011-10-03 10:15:27, Modified By= ZohoTest, Title=notes7, Modified Time=2011-10-03 10:15:27,
Created By= ZohoTest, Owner Name= ZohoTest},
{id=747000000049025, Created Time=2011-10-03 10:15:21, Modified By= srividh, Title=notes6, Modified Time=2011-10-03 10:15:21,
Created By= ZohoTest, Owner Name= ZohoTest}
]

Note:

  • All the keys in the response map are case sensitive.

Using Script Builder

You can define the getrelatedrecords() task using Script Builder by following the steps given below:

  1. Drag and drag the Call function to the builder area and select Integration Tasks.
  2. Select the Service as Zoho CRM and the function as getrelatedrecords.
  3. Select the required CRM Module for which you want to fetch the records.
  4. Select the Parent Module name for which you want to fetch the related records. For example, if you want to fetch " Notes" related to a Potential, then "Potentials" is your parent module.
  5. Specify the ID in CRM based on which the records related to the ID are fetched.
  6. Specify the From/To index. The default value of From index is 1 and To index is 20. The maximum value of To index is 200.
  7. Specify the CRM Response Variable and click Done to add the task to the script builder.
  8. Click Save Script to add the script.

Related Links

http://www.zoho.com/crm/help/api/getrelatedrecords.html

Top