Quantcast
Channel: SCN : Discussion List - SAP Sourcing
Viewing all articles
Browse latest Browse all 1416

Deleting Document link via Script

$
0
0

Hi Experts

 

I am trying to delete a Document Link. The script deletes the document link, but gives the below error as well.

 

Target exception: java.lang.ClassCastException: Cannot cast class com.sap.odp.common.db.ObjectReference to class java.lang.String

 

Below is my script. Please assist as to where I can fix it

 

docLinkList = doc.getDocumentLinkList();

 

if (docLinkList.size() > 0)

{

   docIter = docLinkList.iterator();

   while(docIter.hasNext())

   {

       linkmember = docIter.next();

       Relationship = linkmember.getLinkDefinitionObjRef().getDisplayName().toString();

         

       if (Relationship.equals("Related Project"))  

       {

         docLinkList.delete(linkmember);

       }

   }

}


Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>