Move a file from one File Upload Field to another
Hey All,
Can anyone help me solve a problem i'm having where I move a document from one File Upload Field, and another.
I figured it would be as simple as trying to change the File_ID on the 2nd File Field with the data from the 1st File Field, but it does not seem to work. I am guessing I need to download the file from 1, and attach it to 2.
Heres the code i'm working with:
- Cert = zoho.crm.getRecordById("House_Certification",CertID);
//
CIssued = Cert.get("Issued");
CExpiry = Cert.get("Expiry");
NIssued = Cert.get("New_Issued");
NExpiry = Cert.get("New_Expiry");
NAttached = Cert.get("New_Certificate_Attached");
//
NCertFile = Cert.get("File_Upload_3").toMap();
NCertFileID = NCertFile.get("file_Id");
//
updateCert = Map();
// Fill Main Info
updateCert.put("Issued",NIssued);
updateCert.put("Expiry",NExpiry);
updateCert.put("Served_to_Tenants",'Action Required');
updateCert.put("House_QR",'Action Required');
updateCert.put("Current_Certificate",NCertFileID);
// Clear Add New Cert
updateCert.put("New_Issued",null);
updateCert.put("New_Expiry",null);
updateCert.put("File_Upload_3",null);
updateCert.put("Confirm_Add_New_Cert",null);
updateCert.put("Add_New_Certificate",null);
//
update = zoho.crm.updateRecord("House_Certification",CertID,updateCert);
info update;