Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Add new document links to UDO

Hello,

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?

Thanks,

MP

Former Member
replied

Hi MP,

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.

Good Luck,

Baski

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question