cancel
Showing results for 
Search instead for 
Did you mean: 

Carry over fields from one module to another

Former Member
0 Kudos

All,

In the created lifecycle event of a document that is created out of another (say a project from a UDO or RFx from a project), I am trying to use getDocumentLinkList(). But it returns an empty collection.

I need to carry over fields from one module to another.

Has anyone faced this issue? Is there a solution or an alternative for this requirement?

Thanks & Regards,

Subhasini

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Subhasini,

Did you copy over the document links also while creating the new object? Otherwise I don't think the new object would have links.

Thanks,

MP

Former Member
0 Kudos

Hi MP,

I am using the standard actions 'Create Project', 'Create Rfx' etc to create the respective objects.

Is there a way I can influence that the document links be copied over?

Also, if on the UI of the created object I get to see the document link, does it not mean the 'DOCUMENT_LINKS' collection is already populated? In this case, should the IAPI method to get this 'DOCUMENT_LINKS' field not return that?

Regards,

Subhasini

Former Member
0 Kudos

OK, I thought you were creating these documents through scrips.

I have not worked much on Document LifeCycle events, however per the documentation Created is "Point at which the class is instantiated as new", so maybe all the data is not set yet. Or maybe you should be using Duplicated instead of Created.

Would request other members to please advise.

Thanks,

MP

Former Member
0 Kudos

Hi

If I understand your requirement correctly you need to retrive all document links from a recently created business doc. I would suggest using Saved or Validated target for document lifecycle event script. doc.getDocumentLinkList(); should given a collection of linked objects correctly if you do so.

Regards

Mudit Saini

Former Member
0 Kudos

Hi,

As MP said, this collection is intialized later in the life cycle. Please try using other life cycle events like validate/save. If you want to do it only once when the object is created, you can potentially use methods like doc.isObjectAccessModeNew() or doc.getModifiedAt()

Thanks, Baski