Behavioral properties on data entities
Every data entity has properties that let you override the same property values on the tables or views that are the data sources of that entity. Your choices affect the behavior of the entity. In the following table, the first column lists the properties that are discussed in this article. The top row lists the levels where the property is found in the entity designer. The levels are listed in order of increasing granularity: the data source level is more granular than the entity level but less granular than the field level.
Entity level | Data source level | Field level | |
---|---|---|---|
ReadOnly | Applies | Applies | . |
AllowEdit | . | . | Applies |
AllowEditOnCreate | . | . | Applies |
Mandatory | . | . | Applies |
Entity level
In the designer for your data entity, when you click the name at the root node, the Properties pane includes the Is Read Only property. The following table describes the behavioral differences between the Yes and No values of this property.
Group | Property name | Display name | Values | Default | Description |
---|---|---|---|---|---|
Behavior | IsReadOnly | Is Read Only | No, Yes | No |
|
You would set IsReadOnly to Yes for entities that are consumed mainly for export.
Data source level
If a data entity has three data sources, you might want to allow processes to use the entity to modify the data in one of the data sources but not in the other two. A read-only data source can be used for lookup purposes. You can use the entity designer to achieve this extra degree of granular control. Under the entity's Metadata > Data Sources node, you can select an entity node and then set the IsReadOnly property value for that one data source. The following table describes the interaction between the IsReadOnly settings at the data source level and the entity level.
Group | Property name | Display name | Values | Default | Description |
---|---|---|---|---|---|
Behavior | IsReadOnly | Is Read Only | No, Yes | No |
|
Field level
At the field level, the AllowEdit and AllowEditOnCreate properties are available instead of an IsReadOnly property. The two Allow properties include Auto as a third available value. The Auto value inherits the value that is on the field in the underlying table.
Note
The Auto value isn't available for unmapped fields, such as computed or virtual fields.
Group | Property name | Display name | Value | Default | Description |
---|---|---|---|---|---|
Behavior | AllowEditOnCreate | Allow edit on create | Auto, No, Yes | Auto |
|
Behavior | AllowEdit | Allow edit | Auto, No, Yes | Auto | The behavior is the same as the behavior for AllowEditOnCreate, but it applies to updates to existing records instead of new records that are being created. This behavior is enforced for all consumers – X++, OData, and so on. |
Behavior | Mandatory | Mandatory | Auto, No, Yes | Auto | Auto: The property is inherited from the underlying table field. This behavior is enforced for all consumers – X++, OData, and so on. Important: The No and Yes values do not override the setting on the field in the underlying table. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for