Remove external link

Event action – Abstract

Purpose: Removes the 'external link attribute' for a specific external link type from the attributes of the related object, if present.

See also: Add external link, External Links, External links (background)

The Remove external link event action removes the 'External link' attribute with the External link type specified by the parameter from the attributes of the reference object, if it exists.

If the reference object does not support this attribute type, no attribute with the specified External link type already exists or no External link type is specified, nothing will happen.

By default, the business transaction object types (Common business object, Orders, and Shipments) can be used as reference objects, however, the Manifests cannot be used.

Configuration

images/download/attachments/177907066/image2021-5-12_7-38-39-version-1-modificationdate-1722953256878-api-v2.png

The single, unnamed parameter specifies which 'External link' should be removed by a static, unique selection from the dynamic enumeration External link type.

Since each external link type can be assigned to the same business object only once, only the type must be specified for removal as well.

Example

A ribbon macro in an overview for Shipments should trigger a Custom action event that removes the external link attribute with the External link type 'ERP-Link' (ERP_LINK) for a single selected shipment, if it exists. If the 'ERP link' attribute does not yet exist, it is added instead.

Configuration:

As a reaction to a Custom action event, an event handling is triggered that verifies by Check type that the input value provides an entity of the 'shipment' type as a reference object.

The Action on passed rule is configured as shown on the right:

  • An If then else event action first checks via an Entity property rule whether the shipment has an 'External link attribute' with the Subtype 'ERP link'.

  • If the return value from the Typed attribute resolver for this attribute subtype is 'not empty', then the event action Remove external link (for the same subtype) is executed in the IF branch (left) so that the 'ERP link' is removed.

  • The event action Add external link, on the other hand, is executed in the ELSE branch (right) if no attribute exists for the 'ERP link' subtype.

images/download/attachments/177907066/image-2024-8-6_16-19-7-version-1-modificationdate-1722953947379-api-v2.png