S
Shiva Duriseati
Guest
Hi Greg, There is no direct way to get the file upload URL from client side API, but still you can achieve this. Please take a look at the below code where I've constructed URL from the available tokens 1)Production Sever URL {!#PROD_SERV_URL} 2)Object Definition ID-(Assuming integration name of object is "SampleObject") {!#OBJ_ID.SampleObject} 3)Record ID Can be read from select query. 4)Integration Name of file upload field. 5)Current Customer ID {!#CURR_CUSTM.id} Example: I have created an object lets say "SampleObject" with File Upload field "UploadCertificate" Using selectQuery we need get record id rbf_selectQuery("select id from SampleObject",100,function(arr) { for(var i=0;i<arr.length;i++){ console.log('{!#PROD_SERV_URL}'+"servlet/File?dir=data&objDefId="+'{!#OBJ_ID.SampleObject}'+"&id="+arr [0]+"&name=UploadCertificate&c="+'{!#CURR_CUSTM.id}'); } }); The above function will construct the URL as follows
Assuming object has two records.) localhost:8080/.../File localhost:8080/.../File Please let me know in case you need any assistance. Regards, Shiva
Continue reading...
Continue reading...