cancel
Showing results for 
Search instead for 
Did you mean: 

Can document links be added via scripting?

Former Member
0 Kudos

Can we add document links through scripting on Master Agreement header page? We are trying to mass update document links for about 3000+ records and hence I need to create a script (one time task) that can add these values on MA header page.

I am trying to create the document link defintion as follows:

DocumentLinkDefinitionIBeanIfc dld = (DocumentLinkDefinitionIBeanIfc)

TypeFactory.createObjectReference(620);

dld.setDisplayName("Test");

dld.setInternalName("Test");

dld.setLinkClassId(509);

dls.setSystemDefined(new

Boolean(false));

dld.setLinkDirectionType(new DocLinkDirectionTypeEnumType(3));

dld.setLinkDefinitionType(new DocLinkDefinitionTypeEnumType(3));

and then set this document link defintion to Document Link Bean as follows:

DocumentLinkIBeanIfc dl = (DocumentLinkIBeanIfc)

TypeFactory.createObjectReference(509);

dl.setExtRefDoc("99999");

dl.setExtRefLine("900");

dl.setLinkDefinitionObjRef(dld);

But this is giving me error.

Let me know if I am doing something wrong.

Any help will be appreciated.

-Regards,

Bindu Sharma

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,
I create the document link definition between two agreements (variables doc and otherAgreement) using this code:

documentLinkDef = documentLinkDefHome.findUnique("FCI-CONTRACT RELATED");
newDocLink = doc.documentLinkList.create();
newDocLink.linkDefinitionType = new DocLinkDefinitionTypeEnumType(1);
newDocLink.linkDefinitionObjRef = documentLinkDef.objectReference;
newDocLink.LinkDocObjRef = otherAgreement.objectReference;
doc.documentLinkList.add(newDocLink);

Hope this is helpful

Francisco

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Francisco,

I have one issue i need a script on RFX save event ( not validated )  which will check if there is a project linked to RFX

Regards,

KP