I am trying to create a function that updates corresponding fields in Deals and Leads when a field is edited. I've made sure that the data types are the same when running the script. I've put the .toLong() function in every possible place. Still, I get this error:
- Argument type mismatch - Found 'TEXT' but Expected '[BIGINT]' for the function 'get'at lineNumber 8
Here is the actual script:
- //get Deal record
- zDealRec = zoho.crm.getRecordById("Deals",id.toLong());
- // get Birthday field value
- zBirth = zDealRec.get("Birthday");
- // get Leads record ID
- zLeadsID = zBirth.get("Lead_Name").get(idLead.toLong());
- // create map
- mp = Map();
- mp.put("Birthday",zBirth);
- // update Leads record with field value
- update = zoho.crm.updateRecord("Leads",zLeadsID,mp);