Upload attachment to image custom field
Hello,
I have image attachments in contacts and I would like to upload the image to a image custom field through the API. I have the $file_id through the attachment but I dont know how to update the image custom field with that. I have this code but the image custom field (called "Foto_Mascota" in API) does not update
- listaAttach = zoho.crm.getRelatedRecords("Attachments", "Contacts", idContact);
- idAttach = listaAttach.getJSON("$file_id");
- info idAttach;
- data = List();
- data.add(idAttach);
- actualiza = Map();
- actualiza.put("Foto_Mascota", data);
- actualiza.setParamName("file");
- data2 = List();
- data2.add(actualiza);
- data3 = Map();
- data3.put("data",data2);
- update = zoho.crm.updateRecord("Contacts", idContact, data3);
- info update;
I get a success with updateRecord but nothing changes. Can anyone help?