Automatically adding country code to 'Phone' field in CRM
I have (as far as I know) set up the 'action' correctly and then created a 'workflow' to run this whenever a contact is added or updated.
Here is the function;
- contDetails = zoho.crm.getRecordById("Contacts",contId.toLong());
- phone = ifnull(contDetails.get("Phone"),"");
- mp = Map();
- mp.put("Phone","+44" + phone);
- update = zoho.crm.updateRecord("Contacts",contId.toLong(),mp);
- info update;
- info mp;
What have I missed and any ideas why this isn't working?
TIA