Entity Types

Entity types are named structured types with a key. They define the named properties and relationships of an entity. The key is formed from a subset of the entity type's primitive properties, such as CustomerId, OrderId, and LineId.

Entity types include this data:

  • Name: The unique identifier for the entity type.
  • Binding: The mapping between the OData property and the LN field.

Restrictions / Standard Actions / Subset Filter

This collapsible section includes restrictions, actions, and a subset filter.

Restrictions
Restrictions are used to control the accessibility and security of data entities.
  • Readable: Determines whether the entity set is readable.
  • ReadableByKey: Determines whether the entity set is readable by key.
Standard Actions
Standard actions are used to perform CRUD operations on entities.
  • Updatable: To update an entity, select the Active check box. Optionally, you can select the Use DLL Function check box and provide the DLL and Function name to execute the specified dll function. If the Use DLL Function check box is cleared, an update is handled by directly calling the Data Access Layer.
  • Insertable: To insert into an entity, select the Active check box. Optionally, you can select the Use DLL Function check box and provide the DLL and Function name to execute the specified dll function. If the Use DLL Function check box is cleared, an update is handled by directly calling the Data Access Layer.
  • Deletable: To delete from an entity, select the Active check box. Optionally, you can select the Use DLL Function check box and provide the DLL and Function name to execute the specified dll function. If the Use DLL Function check box is cleared, an update is handled by directly calling the Data Access Layer.
Subset Filter
A subset filter functions similarly to a WHERE clause in SQL, enabling users to filter data based on specified criteria and retrieve only the matching records during a read action. This helps prevent the exposure of irrelevant data. For example, when reading the current parameters from the Generic Parameters (tcgen000) table, the revision records of previous changes are not relevant. In this scenario, the subset filter (tcgen000.indt = 0) is applied to exclude such records.

Properties

Properties are similar to table columns, defining the individual data elements that an entity type can contain.

Properties include this data:

  • Sequence: The sequence of the property.
  • Active: Indicates whether the property is active or not.
  • Binding: The mapping between the OData property and the LN field.
  • Name: The unique identifier for the property within the entity type.
  • Description: A textual explanation of the property, providing more context or details about its purpose and usage.
  • Type: The data type of the property, such as Edm.String, Edm.Int32, and Edm.Boolean. This defines what kind of data the property can hold.
  • Format: The expected format of the property value, such as date format.
  • Collection: Indicates whether the property is a collection of values (like an array) rather than a single value. This is used for properties that can hold multiple entries.
  • Nullable: Indicates whether the property can have a null value. If selected, the property can be blank. If cleared, it must always have a value.
  • Unicode: Indicates whether the property supports Unicode characters.
  • Default Value: The initial value assigned to the property during an insert if no other value is provided.
  • Domain: Specifies the mapping to an enum in LN.
  • Computed: A computed value for this property is generated by the server logic on both insert and update.
  • Computed Default Value: If no value is provided on insert, a non-static default value is generated.

When you select a property, these options are displayed at the right top corner of the property grid table:

  • Delete: Used to delete the property from the entity.
  • Activate: Used to set an inactive property to active.
  • Deactivate: Used to set a property to inactive.

At the top right corner of the property grid toolbar, these buttons are available:

Add Property
Used to add the property to the Entity Type properties.
More Options (…)
  • Row Height: Used to change the height of the row or change the view of the property table. These options are available: Extra Small, Small, Medium, and Large.
  • Filter: The Show filter row option hides and shows the filter row of the property table. The Clear filter option clears all the applied filters.

At the bottom of the properties table, this kind of information can be displayed:

  • Entity field sequence change is allowed only when the Seq. column is sorted in ascending order.

    It is stated here that you can reorder the fields in the entity property only if their sequence numbers (Seq) are in ascending order, like 1, 2, and 3.

  • Inactive property sequences: 1, 5.

    It is stated here that sequence numbers 1 and 5 are currently inactive.

Navigation Properties

Navigation properties represent relationships between entity types, similar to foreign keys in a database. They enable users to link different entity types. For example, a "Customer" has a navigation property to "Orders," allowing access to all orders for that specific customer.

Navigation properties include this data:

  • Name: The unique identifier for the navigation property within the entity type.
  • Type: The type of the target entity type.
  • Use Inter-Company: Indicates whether the entity to which the navigation property refers is present in the current company (cleared check box) or a different company (selected check box).
  • Inter-Company: Identifies the entity property that contains the company number where the reference is present.
  • Nullable: Indicates whether the property can have a null value. If selected, the property can be blank. If cleared, it must always have a value.
  • Collection: Indicates whether the navigation property is a one-to-many relation.
  • ContainsTarget: Can be set to true or false, with the default being false. If set to true, the referenced entity or entities are considered part of the referring entity. These entities cannot exist independently of the containing entity. For example, order line entities are contained in an order header entity.
  • onDeleteAction: The action the service will perform on related entities when the entity for which the navigation property is defined is deleted.
    • Cascade: Deleting the source entity will also delete the related entities.
    • None: A DELETE request on a source entity with related entities will fail.
      Note: If no element is specified in onDeleteAction, the service's action cannot be predicted by the client and may vary for each entity.

The navigation properties' table grid shows additional information about the mapping columns. You can expand the grid by clicking the + symbol and collapse the grid by clicking the – symbol.

The grid includes this data:

  • Properties: Contains the name and binding of the source entity.
  • Referenced Property: Contains the name and binding of the target entity.
  • Constraint: Indicates that a referential constraint exists, ensuring that the value of the navigation property exists in the referred entity set.
Note: You can add a new row by clicking Actions > Add Row in the top right corner.

You can create a new navigation property by clicking the Add Navigation Property button, which will display a popup with these fields:

  • Name: The unique identifier for the navigation property within the entity type.
  • Entity Type: Select the target entity type.
  • Use Inter-Company: Select to use the inter-company property.
  • Inter-Company: Specify the inter-company property.
  • Properties: Select the mapping columns from the source entity type.
  • Add: Click this button to create a navigation property.

Included Enum Types

Included enum types refer to enumerations that are used within an entity type to provide a set of named values. For details, see Enum Types.