Any idea why this deluge function is not working?

Any idea why this deluge function is not working?

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:

  1. Argument type mismatch - Found 'TEXT' but Expected '[BIGINT]' for the function 'get'at lineNumber 8 

Here is the actual script:

  1. //get Deal record
  2. zDealRec = zoho.crm.getRecordById("Deals",id.toLong());
  3. // get Birthday field value
  4. zBirth = zDealRec.get("Birthday");
  5. // get Leads record ID
  6. zLeadsID = zBirth.get("Lead_Name").get(idLead.toLong());
  7. // create map
  8. mp = Map();
  9. mp.put("Birthday",zBirth);
  10. // update Leads record with field value
  11. update = zoho.crm.updateRecord("Leads",zLeadsID,mp);