Form Data Source Properties

Applies To: Microsoft Dynamics AX 2012 R3, 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 form data sources.

Property

Description

New in this version of
 Microsoft Dynamics AX

AllowCheck

Specifies whether security checking occurs early, before the form opens.

Yes – Before the form opens, check that the user has access to the form. A message is displayed if the form cannot open. Yes is the default, and is generally recommended.

No – After the form opens, check whether the user has access to the form. If the user lacks access to the form, or to the underlying data sources, the form does not display any data.

AllowCreate

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

AllowDelete

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

AllowEdit

Specifies whether users can make modifications to fields on the form.

Note

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

AutoNotify

Determines whether the system receives a notification if a record is changed. The default value is Yes.

Caution

The AutoNotify property is no longer used. The property will be removed in a future version of Microsoft Dynamics AX.

This property forms part of the AutoJoin System.

AutoQuery

Determines whether a query is automatically generated for the data source that joins it with the data source that is specified in the JoinSource property. The default value is Yes.

This property forms part of the AutoJoin System.

AutoSearch

Determines whether the system automatically performs a search on the data source. The default value is Yes.

This property forms part of the AutoJoin System.

CounterField

Enables you to specify one of the fields in the data source as a counter for the form. 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 form is supplied with a line number that corresponds to the actual sequential position in the form. 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.

Note

To display company information, add the DataAreaId field from the data source to the form.

For more information about cross-company queries, see Cross-Company Data Access.

DelayActive

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

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.

Note

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 shown in the form, based on this data source.

The initial sort order for the records shown in a form 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 (for example, by pressing F8).

InsertIfEmpty

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

If InsertIfEmpty is set to No, the user must manually create a new record (for example, by pressing CTRL+N).

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(s) 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 controls on the form.

This property is designed to be used in lookup forms. There is no code in these forms, and they open more quickly because the result set is smaller.

When the OnlyFetchActive property has been set to Yes, records cannot be deleted from within the form. This is to preserve data integrity by ensuring that a delete operation is never attempted on incomplete records. If the user attempts to delete a record, an error message is issued.

OptionalRecordMode

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

May be set to one of the following options:

  • 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 deletes the 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 form opens.

Table

Sets the table used as the data source.

ValidTimeStateAutoQuery

Specifies the type of query for date effective data (AsOfDate or DateRange).

AX 2012

ValidTimeStateUpdate

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

  • CreateNewTimePeriod – 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

Form Data Source Field Properties

Form Control Properties

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.