Deluge: how to fetch Zoho CRM subform data

Viewed 141

Hey I'm trying to get data from a Zoho CRM subform "PG_Info" to show up so I can merge it into a Zoho Writer template. When I try the code below it returns "null" for all entries. Any ideas?

r_Deal_Record = zoho.crm.getRecordById("Deals",Deal_Record_ID);
Subform = r_Deal_Record.get("PG_Info");
for each rec in Subform
{
field1 = rec.get("PG");
field2 = rec.get("SSN_PG");
field3 = rec.get("Ownership_Percent");
}
info field1;
info field2;
info field3;

Thank you

2 Answers

from your current code, the info's should be inside of the "for each" statement.

2 things to check:

#1. Double-check that the id number in Deal_Record_ID is correct and a record exists for it. Do this through the Zoho CRM user interface instead of through deluge-code.

#2. Display the full Subform variable with info Subform;. It may be 'null' (just like the record fields) but sometimes there is an error message or some data that is helpful to resolving the issue.

Related