Compartilhar via


Data Set Data Source Properties

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

The following table describes the properties that are available for data set data sources.

Property

Description

New in this version of
 Microsoft Dynamics AX

AllowCheck

Specifies whether security checking occurs early (before the data set is accessed).

Yes – The read permissions for the user are checked before the data set is accessed. Yes is the default, and is generally recommended.

No – The user's read permissions are checked only after the data set is accessed. No data is retrieved if the user lacks sufficient permission for the underlying data sources.

AllowCreate

Specifies whether users can create new records in the data source (in the table for the data source).

AllowDelete

Specifies whether users can delete records in the data source (in the table for the data source).

AllowEdit

Specifies whether users can make modifications to the data.

Tip

You can set the AllowEdit property for the entire data source here, but to prohibit modifications for individual fields, the same property exists on each field in the data source.

AutoNotify

Not used for data sets.

AutoQuery

Not used for data sets.

AutoSearch

Not used for data sets.

CounterField

Enables you to specify one of the fields in the data source as a counter for the data set. The field must be an index on the table that underlies the data source, and must be of type real.

The CounterField property is used to ensure that a record inserted in a data set is supplied with a line number that corresponds to the actual sequential position in the data. For example, if a new line is inserted between lines 3 and 4, the new line is supplied with line number 3.5.

CrossCompanyAutoQuery

Specifies whether the data source retrieves data from more than one company database. For more information about cross-company queries, see Cross-Company Data Access.

DelayActive

Enables you to delay the execution of the active method for the data source.

If this property is set to Yes, the active method is activated only after a delay of 20 milliseconds. When a user scrolls through a data source, the active method is not called on every record—on only the final record that the user selects.

Tip

This property is particularly useful when two data sources are linked (when the LinkType property is set to Delayed).

This property forms part of the AutoJoin System.

Index

Sets the index used to specify a sorting order. You can choose any of the indexes on the table.

If you specify an index in this way, it is used as an index hint on each of the queries to the database. It specifies both an access path and a sort order for the records in the data set, based on this data source.

The initial sort order for the records is prioritized as follows:

  • If sort fields are added to the data source query, the sort specification is used.

  • If an index is specified in the Index property on the data source, the sort order used is implicitly specified in that index.

  • If the data source is autojoined with another data source, the system locates the most adequate index for this join, and then sorts the data according to that index.

  • If nothing else is specified, the sort order is the one that is implicitly specified in the first index (the one with the lowest ID) on the table that is used in the form data source.

When no index hints are specified, the database management system locates an applicable access path. It is based on the information in the supplied query.

The sort order for a form can be changed by a user by using the query dialog.

InsertAtEnd

Determines whether a new record is created when the user moves focus past the last record in the table.

InsertIfEmpty

Determines whether a blank record is inserted if there are no records in the table.

If InsertIfEmpty is set to No, you must manually create a new record.

JoinSource

Enables you to join two data sources.

Set this property when two or more tables are used as the data source, and you want to join them.

LinkType

Enables you to maintain an active link between two data sources. When focus changes in the first data source, the corresponding record or records in the other data source are selected.

An example of using this property is a customer table and a table of transactions for each customer. Scrolling from one customer to the next also automatically updates the transaction list to display transactions for the current customer.

Set this property to Delayed for the outer (externally linked) data source. The linked data source is updated only after a delay of 100 milliseconds. This ensures that the linked data source does not update while a user is scrolling through a data source—only after the user finally focuses on a record.

This property forms part of the AutoJoin System.

For more information about link types, see How to: Join Data Sources for a Form.

Name

Sets the name of the data source. This should be the same as the name of the underlying table.

OnlyFetchActive

Determines whether all fields in the data source should be fetched, or only those that are used by the data set.

When the OnlyFetchActive property has been set to Yes, records cannot be deleted from the data set. This is to preserve data integrity by ensuring that a delete operation is never attempted on incomplete records.

OptionalRecordMode

Specifies the create and delete behavior for records on an outer joined table.

The following options are available:

Property

Description

ImplicitCreate

When no record is saved in the database, create an outer joined record and joined tables as soon as the parent record becomes active. If the outer joined record or its children are not changed, they will be deleted when the parent record is no longer active.

ExplicitCreate

When no record is saved in the database, treat this record as disabled until the user explicitly triggers creation with the Optional Record checkbox. When the record exists, unchecking the checkbox will delete this record.

None

No special create or delete happens with an outer joined record.

AX 2012

StartPosition

Defines whether the first or the last record should be the current one when the data set is accessed.

Table

Sets the table used as the data source.

ValidTimeStateAutoQuery

Specifies the types of queries for date effectivity. (AsOfDate or DateRange)

AX 2012

ValidTimeStateUpdate

Specifies the types of updates for an existing date effective record. The options are as follows:

  • CreateNewTimePeriod – On the record that is becoming the previous record, its ValidTo date field is set to a date that is no later than now. In the same transaction, the new current record has its ValidFrom field set to immediately after ValidTo date of the previous record.

  • Correction –The ValidFrom or ValidTo values of existing rows must be modified to keep the date effective data valid after it updates the record set.

  • EffectiveBased – Records in the past cannot be edited. Records that are currently active are edited in a manner similar to CreateNewTimePeriod mode. Future records are edited in a manner similar to Correction mode.

The default value is CreateNewTimePeriod.

AX 2012

See also

Data Set Properties