Automatically adding country code to 'Phone' field in CRM

Automatically adding country code to 'Phone' field in CRM

I'm having some trouble getting this to work - https://help.zoho.com/portal/en/community/topic/custom-function-7-add-country-codes-to-contact-numbers

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;
  1. contDetails = zoho.crm.getRecordById("Contacts",contId.toLong());
  2. phone = ifnull(contDetails.get("Phone"),"");
  3. mp = Map();
  4. mp.put("Phone","+44" + phone);
  5. update = zoho.crm.updateRecord("Contacts",contId.toLong(),mp);
  6. info update;
  7. info mp;
What have I missed and any ideas why this isn't working?

TIA