How to Pull Data from Zoho CRM to Auto-Fill ZC Fields & Update New Information Back to Zoho CRM

How to Pull Data from Zoho CRM to Auto-Fill ZC Fields & Update New Information Back to Zoho CRM

If you want your Zoho Creator application to pull data for a record from Zoho CRM, and auto populate the fields in your Zoho Creator App - then, upon submission, also update the new information back to Zoho CRM - here's a little tutorial for you.

Here's how to do it:

Step 1: Create a CRM Lookup Field for the record you want to pull info of lets say it's a LEAD and the ZC field name is Lead_Name.

Step 2: Lets say you want to fetch "First Name, Last Name & Email" for this lead. Then create 3 fields in your Zoho Creator form called "First Name, Last Name & Email" respectively.

Step 3: Next, in "ON INPUT" for this field, enter this code:

crmresp = zoho.crm.getRecordById("Leads", input.Lead_Name_ID);
input.First_Name = crmresp.get("First Name");
input.Last_Name = crmresp.get("Last Name");
input.Email = crmresp.get("Email");

This shall populate the respective fields with information pulled from CRM for that lead.

Step 4: Now if you want to change this info & update the record in CRM when you click submit, then at ON SUCCESS or ON VALIDATE, enter this code:

resp = zoho.crm.updateRecord("Leads" , input.Lead_Name_ID , {"First Name":input.First_Name,"Last Name":input.Last_Name,"Email" : input.Email});

Step 5: Clicking the Submit button will update the CRM record with the new / updated info..

Hope this helps - if you need more help with any of your Zoho Creator development needs, feel free to visit ... http://www.edesignservices.us/enterprise-mobility/

Best Regards,

Muhammad Talal

E Design Services LLC

P: 1-773-661-4084
T: 1-888-774-9404
F: 1-866-910-5979
S: myafs1
E: talal@edesignservices.us
W www.edesignservices.us