Add new document links to UDO
I have created a UDO from an RFX and am now am trying to link the 2. I want to add a link in the RFX to the UDO and in the UDO to the RFX.
I have added the link from RFX to UDO as follows:
linkCollnRFX=doc.getDocumentLinkList(); newMember=linkCollnRFX.create(); newMember.setDisplayName("Test Link"); newMember.setLinkDefinitionType(new DocLinkDefinitionTypeEnumType(1)); newMember.setLinkDocObjRef(udoBean.getObjectReference()); relnHome =IBeanHomeLocator.lookup(session, DocumentLinkDefinitionIBeanHomeIfc.sHOME_NAME); relnBean = relnHome.findUnique("RelatedSRF"); newMember.setLinkDefinitionObjRef(relnBean.getObjectReference()); linkCollnRFX.add(newMember); //save the document doc.getIBeanHomeIfc().save(doc);
I need to the same thing for the UDO. UserDefinedBizDoc1IBeanIfc has getAllDocumentLinks() which returns CollectionIfc. CollectionIfc has no add method. Can someone please help me understand how I can add to this collection?
Baski Janarthanam replied
getAllDocumentLinks doesn't seem to return AssociativeCollectionIfc. it returns an instance of annonmous class and unfortunatley typecasting doesn't seem to be an option
if documentLinkList() method isn't available and it does seem to be an issue as it use to be in earlier releases I guess. Please raise an OSS message with SAP giving the background.