Skip to Content
avatar image
Former Member

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 13, 2011 at 03:26 AM

    Hi,

    You can use getDocumentLinkList() which is an instance of AssociativeCollectionIfc and this has ADD method to it. if you are using the other try type casting to AssociativeCollectionIfc and try add.

    Thanks,

    Baski

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      The getdocumentLinkList() was missing in On Demand 7.0 and was fixed in Version 7.0 SP2 Patch 1. Thanks to Baski for highlighting that it was available in earlier releases.

      Earlier support just said that my request had been sent to Product Development to add to their backlog, but when I said it was available in earlier releases, they came back with the info that it was fixed in SP 2 Patch 1. We upgraded to Wave 8 and are all set for this issue.

      Thanks,

      MP