Links
As mentioned previously, a link was a special kind of record that blurred distinctions between types of records created from different business objects. Link records existed only in a smart section.
In the past, one of the uses of link business objects was to report on multiple business objects. Now, Report Builder queries can report on multiple business objects without using link business objects. Use Report Builder queries to report on multiple business objects.
In the past, another of the uses of link business objects was to allow different business objects to appear in multi-record smart sections. Now, query sections provide this functionality without using link business objects or multi-record smart sections. Use query sections to display information from different business objects.
We will explain how a link works by first explaining how the other kinds of records, stand alone and embedded, organize their fields.
Consider the following diagram. It shows the organization of two kinds of records that are not links. One is a Textbook record. The other is a Sample Application record. The diagram shows three fields of each record.
Some fields in the records have the same name. They both have a field named Name and another field named Description. Each record also has fields with names that the other record does not have. The Textbook record has a field named Publisher that the SampleApplication record does not. The Sample Application record has a Revision Date field that the Textbook record does not.
Clearly, these two records are different. Because they have different fields, they must be treated differently. Looking for a Publisher field in a Sample Application record does not work.
Link records are created when a person or workflow adds a record to a section based on an association with a link business object. Instead of causing the section to reference the record being added, the section creates a new link record that is linked to the record being added to the section. The section references the link record rather than the record it was asked to reference.
If the name of a field in a link record is different from any field name in the record it is linked to, the field's initial value is determined normally. However, fields in the link record that have the same name as a field in the linked record have their initial value copied from the field with the same name in the linked record. This organization is shown in the following diagram.
The second diagram shows the same records we saw in the first diagram, each linked to a link record created from a business object named Course Material. The Course Material records are links that have fields with some of the same names as the Textbook and Sample Application records.
The second diagram shows how the fields of each Course Material link record are given initial values from the record that it is linked to. The Name, Description and Publisher fields of the Course Material record linked to the Textbook record have their initial value copied from like-named fields in the linked record. The Revision Date field does not get its initial value from the linked record because the record it is linked to does not have a field named Revision Date. Similarly, the Name, Description and Revision Date fields of the Course Material link that is linked to the Sample Application record have their initial values copied from the like-named fields in the linked record. The Publisher field does not get its initial value copied from the linked record because the record it is linked to does not have a field named Publisher.
If a section references records through links rather than directly, all records in the section appear to have the same number of fields with the same names and data types.
After the fields of link records are set to their initial values, what happens to the values after that is determined by the properties of the section that contains the link records. Whether or not a user interface should allow the values of the link record's fields to be modified and whether or not changes in the linked record will be copied to the fields of the link record are things that are controlled in the usual way by the section's properties: the Reference Only radio button, the Live Link check box and the Reference With Modify radio button.
Whether or not a user can click a hyperlink to the linked record in a single-record smart section is set by the smart section's Show Embedded Link check box.
There is a restriction on the kinds of records that a link can be linked to. A link record can be linked only to a record that was created from a business object in the same module as the business object used to create the link record.