Hi All,
We tried deleting attachments of master agreement through script.
1. what we did was get attachmnet through this method.
2. iterate through collection.
3. then delete attachment.
But issue its not getting fully deleted. Attachment is not seen in UI but when I log the size of this collection. it still shows the same value.
oAttachmentsColl=doc.getAttachments();
m_deleteAttachment(oAttachmentsColl){
iter=oAttachmentsColl.iterator();
com.sap.odp.api.ibean.IBeanIfc [] check = new com.sap.odp.api.ibean.IBeanIfc[oAttachmentsColl.size()];
cnt =0;
while(iter.hasNext()){
attachmentBean = iter.next();
if (oAttachmentsColl.size() > 0) {
check[cnt]=attachmentBean;
cnt++;}}
for(i=0;i<cnt;i++) {
oAttachmentsColl.delete(check[i]);}}
Let me know how to resolve this
Regards,
Ankur