LinkedIn
Copied!

Table of Contents

Link-Objects method

Version:

Only available versions of this content are shown in the dropdown

Use this method to create an instance of a concrete class derived from the Link- base class. A link functions as a bidirectional cross reference to associate two objects together.

For example, instances of the standard Link-Attachment class associate attachments of various types with work item history instances. The properties in this class identify the work item ID, the attachment's class and key, and the date and time of the history instance. (Attachments themselves belong to a different concrete class, one derived from the Data-WorkAttach- class.)

Parameters

This method has several parameters. The last two form an array of property names (not arbitrary property references) and property values.

Parameter Description
LinkToPage Enter the name of an existing clipboard page that is to be linked to the step page.
LinkClass Enter the concrete class for the linked objects, a class derived from the Link- base class. To create a work item attachment, enter Link-Attachment.
LinkDataTransform Optional. Enter the name of a data transform that applies to the LinkClass class, or a parent class of that class.
LinkMemo Optional. Enter text that becomes the pyMemo value of the link object.
LinkPageProperty Optional. Enter in this array a property or properties to be set by this method.
LinkPageValue Optional. Enter a value for each property, a literal, a property reference, or a linked property reference.

Results

  1. The system creates a page of the class specified in the LinkClass page.
  2. If the LinkData Transform field is not blank, the system finds and applies the data transform to the new page.
  3. It adds the memo text, and applies the other properties identified in the array.
  4. It adds the properties and values (if any) specified in the array. It adds property values identifying both the object in the LinkToPage page and the object in the step page.
  5. The system saves the Link- page (as with the Obj-Save method) but does not commit the page.

For instances of the Link-Attachment class, the system forms the key from the class name pxLinkedRefFrom property value (for example PEGASAMPLE W-153) and the date and time of the save operation, ensuring uniqueness.

Checking the method status

This method updates the pxMethodStatus property. See How to test method results using a transition.

Related Content

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.