Auto populate selected fields names
Hi Everyone, I want to insert the field name of the selected field which is decision field in subform in CRM from creator. I want to insert the value each value have a separate row in subform
I have form in Zoho Creator, and it's have a associated Deal in CRM.
And it contains 20 decision fields.in my Deals Module I have a subform name Document_Required and it contains Document_Name field which is Single line.
Now, I want to populate the field names of the ticked of selected decision fields from my form in Zoho Creator, to subform in the Deals Module.
I contained the field names into variables.
example:
response = zoho.crm.getRecordById("Deals",deal_id);
previous_subform = response.getJSON("Document_Required").toList();
getdocument = previous_subform.getJSON("Document_Name");
if(input.Decision1 == true)
{ field1 = "Decision1";
}
if(input.Decision2 == true)
{ field1 = "Decision2";
}
createmap =Map();
createmap.put("Document_Name",field1);
createmap.put("Document_Name,field2);
createmap.put("Document_Name",field3);
data = List();
data.add(createmap);
response2 = zoho.crm.updateRecords("Deals",deal_id,data);
this is not working