Skip to main content

Posts

Showing posts from July, 2023

Table Keys: Surrogate, Alternate, Replacement, Primary, and Foreign

Primary key A primary key is one type of key. The other type of key is an alternate key. There is a maximum of one primary key per table , whereas a table can have several alternate keys . The primary key is usually the type of key that other tables, called child tables, refer to when a foreign key field in those other tables need a relational identifier. Starting in Microsoft Dynamics AX 2012 the primary key for every new table is always enforced by an index that has exactly one field. The one field is usually an incremented number or a completely meaningless number that is generated by the system. For new tables the default is a primary key based on the RecId field. This is represented as the surrogate key in the user interface. The following table describes the  PrimaryIndex   property and other major properties that are related to keys. Property Description PrimaryIndex The drop-down list contains the surrogate key plus every index on the table that has its  Alternate...

Research, reread, and refresh methods on form data source in d365 finance and operations

The research, reread, and refresh methods are used to update the data displayed in a form in D365FO. Research reruns the existing form query against the database, therefore updating the list with new/removed records as well as updating all existing rows. Reread queries the database and re-reads the current record contents into the datasource form cache. This does not update the form controls, so you need to call refresh() after reread() to update the form controls. Refresh refreshes the data displayed in the form controls with whatever is stored in the form cache for that particular datasource record. Here is a table that summarizes the differences between these methods: Method Description Research Reruns the existing form query against the database, updating the list with new/removed records as well as updating all existing rows. Reread Queries the database and re-reads the current record contents into the datasource form cache. Does not update the form controls. Refresh Refre...

Different cache lookup settings in D365 Finance and Operations

  There are Four different cache lookup settings: NotInTTS: This setting caches data for the duration of the transaction. This means that the data will be available for queries that are executed within the same transaction, but it will be flushed from the cache when the transaction is committed or rolled back. Found: This setting caches data for the duration of the user's session. This means that the data will be available for queries that are executed by the same user, even if they are executed in different transactions. EntireTable: This setting caches the entire table in memory. This means that all of the rows in the table will be available for queries, even if they are not specifically referenced in the query. FoundAndEmpty:  Found and empty cache lookup is a type of cache lookup that is used to store data in memory, even if the data does not exist. This can be useful for tables that are frequently used to check for the existence of a record, such as the Dis...