Topic regarding update Download filed file update using ZOHO v2 API function.
I have spend lot’s of time to get it working and also on this I did not get support from ZOHO, they are not replying me and no where i found documents about update download field value in particular record. Now you no need to worries here is correct working solution to update value using ZOHO function v2 API.
So let’s go step by step.
Step 1:
First you need to add Download field in your module. like below
Now you need to find API name of Module and Field from > Tools > API > API Name
Step 2:
Now we going to create a connection and that is required to update field value with revoke URL.
Got to Tools > Developer > Connection and Add new and give access of
Then you need to connect and look like below
Step 3:
In this third step you need to Create a custom function and you need to go under Tool/Setting > Developer > Function and click on add new function
Now we are going to write code inside the body
resp = invokeurl
[
url :URL
type :GET
];
//File revoke object what you added
info resp;
//Create a list of file array
files = List();
resp.setParamName("file");
files.add(resp);
resp = invokeurl
[
url :"https://www.zohoapis.com/crm/v2/files"
type :POST
files:files
connection:"youtConnection"
];
info resp;
//Get file upload status with data and upload ID and that we need to add under the Download field
fileid = resp.getJSON("data").get(0).getJSON("details").getJSON("id");
info fileid;
//Add file upload id
filelist = List();
fmp = Map();
fmp.put("file_id",fileid);
filelist.add(fmp);
//Need to map Download field for attach upload document/file.
mp = Map();
//eFile is Download field API name
mp.put("eFile",filelist);
update = zoho.crm.updateRecord("Document",0983982983928938,mp);
info update;
On above code will help you to upload file using with https://www.zohoapis.com/crm/v2/files API call
So above is success response and updated on field on your selected record.
Having any issue please Write Comment here or drop me message on Skype parbat_pithiya 🙂
Thank you, Take care, bye
Leave a Reply