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?
- void automation.Update_all_call_prospect_types(Int contactId,Int accountId)
- {
- // contactId = 4642044000069472493;
- // accountId = 4642044000069468605;
- ContactsDetails = zoho.crm.getRecordById("Contacts",contactId);
- Calls = zoho.crm.getRelatedRecords("Calls","Contacts",contactId);
- Callcount = Calls.size();
- info Callcount;
- ProspectingOACallCount = 0;
- ProspectType = ContactsDetails.get("Contact_Type");
- info ProspectType;
- replace = Map();
- for each call in Calls
- {
- replace.put("Prospect_Status",ProspectType);
- info ProspectType;
- }
- }