Hi,
We have a scenario in which we are pre filling attachments into a form using renderPDF service. We have a form which contains fields to attach the document, Attach button and Remove button. Now we are prefilling this form with some attachment coming from a database. We are able to associate the name of that attachment to the field. The problem is that we are not able to remove the attachment which was prefilled. The Remove button works properly only if the attachment is added on the form using the Attach button not when the attachment is prefilled.
Script for attach button:Click event
-----------------------------------
var iDoc=event.target;
iDoc.importDataObject("dataObject");
var oAttachment=iDoc.getDataObject("dataObject");
Script for Remove button:
--------------------------
var rDoc=event.target;
rDoc.removeDataObject("dataObject");
We want to know how can we remove an attachment from a form which is prefilled through Render PDF.
Thanks and Regards,
Leena Jain