Update a field in ALL all calls under a contact

Update a field in ALL all calls under a contact

HI guys!

I have written some deluge code to update a field in my calls after i have comepleted the call, i need this field to update in all my scheduled calls as well that are comeing up. I just cant seem to get it to work, i have put teh code below, hopefully you can have a look at it and see where I went wrong?
  1. void automation.Update_all_call_prospect_types(Int contactId,Int accountId)
  2. {
  3. // contactId = 4642044000069472493;
  4. // accountId = 4642044000069468605;

  5. ContactsDetails = zoho.crm.getRecordById("Contacts",contactId);
  6. Calls = zoho.crm.getRelatedRecords("Calls","Contacts",contactId);
  7. Callcount = Calls.size();
  8. info Callcount;
  9. ProspectingOACallCount = 0;
  10. ProspectType = ContactsDetails.get("Contact_Type");
  11. info ProspectType;
  12. replace = Map();
  13. for each  call in Calls
  14. {
  15. replace.put("Prospect_Status",ProspectType);
  16. info ProspectType;
  17. }
  18. }