Update a field in Contacts from a custom module

Update a field in Contacts from a custom module

Hi,
I have this function which works very well. It updates a date-type field in Contact from a custom module.

  1. custinfo = zoho.crm.getRecordById("Vingo_Ride",custid.toLong());
  2. ctime = custinfo.get("Ride_date");
  3. relcont = zoho.crm.searchRecords("Contacts","(Email:equals:" + email + ")");
  4. if(relcont.size() > 0)
  5. {
  6. for each  rec in relcont
  7. {
  8. contid = rec.getJSON("id");
  9. break;
  10. }
  11. update = zoho.crm.updateRecord("Contacts",contid.toLong(),{"Last_Ride_date":ctime.toDate()});
  12. update1 = zoho.crm.updateRecord("Vingo_Rides",custid.toLong(),{"Contacts_Name":contid.toLong()});
  13. }

I would like to do the same thing for the another text field from the same custom module.
I duplicate the function and the workflow. Edited what needed to change and tried to adapt the function, since the field to update is not a date field.
The workflow tells me that each test is a success, but I don't see anythin being populated in Contacts.

What am I doing wrong?
Here is the function I am using:

  1. custinfo = zoho.crm.getRecordById("Vingo_Ride",custid.toLong());
    ctime = custinfo.get("Route_Completed");
    relcont = zoho.crm.searchRecords("Contacts","(Email:equals:" + email + ")");
    if(relcont.size() > 0)
    {
    for each  rec in relcont
    {
    contid = rec.getJSON("id");
    break;
    }
    update = zoho.crm.updateRecord("Contacts",contid.toLong(),{"Last_Route_Completed_Yes_No":custid.toLong()});
    update1 = zoho.crm.updateRecord("Vingo_Rides",custid.toLong(),{"Contacts_Name":contid.toLong()});
    }

Thank you so much!