Functio to Update Zoho CRM Record from Zoho Creator

Functio to Update Zoho CRM Record from Zoho Creator

Hi,

I am trying to create a function in ZC to update the respective Zoho CRM contact Record.But I am getting error and I can't figure out where is the problem in my code

  1. void CRM.CRM_Sync(ContactForm rcd)
  2. {

  3. for each rec in rcd sort by Added_Time desc range from 1 to 20
  4. {
  5. srt = rec.Zoho_CRM_Contact_Name_ID.toString();
  6. com = TV_Station[ID ==rec.crm_TV_Station ].Add_TVStation_Name.toString();
  7. dat = TV_Station[ID == rec.crm_TV_Station];
  8. net = Network[ID == dat.Add_primaryChannel].Network_Name.toString();
  9. mrk = Market[ID == dat.Add_Market].Market_Name.toString();
  10. grp = Broadcast_Management[ID == dat.Add_BM1].BM.toString();
  11. stype = Station_Type[ID == dat.Add_ST1].ST_Name.toString();
  12. hh = Market[ID == dat.Add_Market].Households_2008_2012.toLong();



  13. resp = zoho.crm.updateRecord("Contacts", srt, { "Company" : com, ".1 Channel" : net, "Market" : mrk, "Broadcast Management" : grp,"Mailing Street" : rec.crm_Mailing_Street, "Mailing City" : rec.contacts_City, "Mailing State" : rec.contacts_US_State, "Mailing Zip" : rec.contact_ZipCode, "Media Type" : stype, "Households" : hh });
  14.  
  15. }

  16. }



Screenshot :





Can anyone please help me

Arfater