We have a file upload field on a custom module named "Attachment". We want to use a Deludge function that copies this field and adds it to a file upload field on the Account module. The account level field is also called "Attachment".
Here's a sample of what the code would look like:
- record = zoho.crm.getRecordById("Account_Update_Record",recid);
- facilityid = record.get("Facility").get("id");
- attachment = ifnull(record.get("Attachment"),"");
- updateMap = map();
- updateMap.put("Attachment",attachment);
- updateAccount = zoho.crm.updateRecord("Accounts", facilityid, updateMap);
Using this code on standard field works fine. But it does not work on a file upload field.
The info/data I get from a file upload field/attachment is:
{"extn":"pdf","is_Preview_Available":true,"download_Url":"/crm/org836459609/specific/ViewAttachment?fileId=8xsbid5d5b597f2bf4ae69664f697353beeda&module=CustomModule5&parentId=5998926000000503298&creatorId=5998926000000440001&id=5998926000000503299&name=Managed+Care+Payors+-+2023.pdf&downLoadMode=default","delete_Url":"/crm/org836459609/deleteattachment.do?attachmentid=5998926000000503299&module=CustomModule5&id=5998926000000503298&creatorId=5998926000000440001&fromFileUploadField=true&nextStep=relatedlist&isajax=true&fieldId=5998926000000494298&fromPage=edit","entity_Id":5998926000000503298,"mode":"pdfViewPlugin","original_Size_Byte":"35779","preview_Url":"/crm/org836459609/specific/ViewAttachment?fileId=8xsbid5d5b597f2bf4ae69664f697353beeda&module=CustomModule5&parentId=5998926000000503298&creatorId=5998926000000440001&id=5998926000000503299&name=Managed+Care+Payors+-+2023.pdf&downLoadMode=pdfViewPlugin","file_Name":"Managed Care Payors - 2023.pdf","file_Id":"8xsbid5d5b597f2bf4ae69664f697353beeda","attachment_Id":"5998926000000503299","file_Size":"35.78 KB","creator_Id":5998926000000440001,"link_Docs":0}
What can I do to get this functionality to work?