--- title: "Linked" slug: "base-line-item-event-linked" updated: 2026-04-02T11:55:26Z published: 2026-04-02T11:55:26Z canonical: "docs.lobstersoftware.com/base-line-item-event-linked" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Linked The 'Linked' event is triggered when clicking the **Link line items** button (see image below), which can be used in input forms for business objects in a 'Link line item' element on any position level. The link is actually established independently of the use of the button by making a selection in the 'Link line item' element for the 'Link line item' in a 'Linked business object' (in the image: shipment) and saving this two-part reference with the data of the edited business object. In the following very simple example, three items in one shipment refer to a specific item (No. 1) in another shipment (No. 3001). ![images/download/attachments/62850455/image2018-9-3_15_37_36-version-1-modificationdate-1603454691280-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2018-9-3_15_37_36-version-1-modificationdate-1603454691280-api-v2.png) The **Link line items** button, which appears in each line item in the example, can optionally be used to trigger specific actions via the 'Linked' event. On the one hand, the data of the business object are available as data context for the event. On the other hand, two variables are assigned information from the item where the button was activated: | Variable name | Data type | Content | Reference to the example data (see below) | | --- | --- | --- | --- | | **lineItemId** | Long | The system-wide unique ID of the line item assigned internally by **Lobster Data Platform/Orchestration** | < lineItem **id="2651"** ... > | | **lineItemIndex** | String | The automatically assigned value for the **Position no.** | | ## Example The following excerpt from the XML structure for the items (lineItems) of a shipment is intended to clarify which properties from the data model are assigned to the variables and how the link is embedded in the data structure of the item. --- ```xml [...] ``` --- **CAUTION****:** The association of the variable names can be confusing because the **Variable** lineItemId is not assigned the value of the property lineItemId (Position no.), but the id of the lineItems . Within the link, the linkedLineItemId property refers to the id of the linked item and not to its lineItemId ('Position no.). The distinction between 'ID' and 'Positions no.' is important because the value of the 'Positions no.' can change spontaneously when positions are deleted or added. On the other hand, the 'ID' of a position remains stable from the creation to the deletion of the position.