Skip to main content

Replacement Key

 I want to explain how to use replacement key functionality on AX 2012.

D365FO has the same ability too.

Replacement key helps you to link your parent child tables through the parent table RecId value but on the user interface it will display the string data that makes more sense to the user.

With this ability you don't have to struggle with preparing unique string field to link parent and child table which we all know it could be a nightmare.

Let's start with how can we activate replacement key functionality on AX 2012 

First create the parent table 


Table name is ParentTable and it has two fields Id and Name. Id field is the unique field.
After creating the index change the Allow Duplicates property to No and change the Alternate Key to yes.

On table properties you should be able to find your index name under ReplacementKey. There can be only one replacement key per table.



Parent table is ready now create the Child table with one field ChildName


When you create a relation on child table with the parent table and select PrimaryKey based option system will create the relation field on child automatically and link to this relation.



Save your table and create a new form to test. Form has ChildTable as datasource and two fields child name and parentTable fields. If you noticed the parentTable field type is referenceGroup that means it will store the data as RefRecId but will display the id of the parent to the user instead. 


Adding some test data to parent table and opening the child details form 



Lookup has the records to choose but are we need the names too to know which id belongs to which name.
Solution is simple just add the details fields to the AutoLookup field group on the ParentTable.


We have names now to choose the correct parent now.

After user saves the records system fill the reference field.


Hope this helps you to link tables, see you next time!
Alper.
























 



Comments

Popular posts from this blog

Management Reporter (MR)

      Management reporter is  a tool that help users to create their own financial reports without customization/development or help from the IT team/consultants . Is used to prepare financial statements such as income statements, balance sheet etc which has the GL transactional/budget data and dimensions in D365 F&O. It was outside Ax but now you can reach within the D365 F&O.      You may use the functionalities below:          -    Transactional and Budgets Data          -     COA and Dimensions          -     Total Accounts          -     Report Variances          -     Pre Set Reports          -     Report Details of Transactions like voucher number, vendor and customer etc for audit reporting         -    Report for Consolidations         -    Report in Different Currencies

D365 F&O Transportation Module (TMS)

      I would like to give some summary information on the TMS module. TMS module helps you manage your both inbound and outbound operations.   You can plan your shipments, routes, loads, appointments and drier check in/outs.  You can see the fastest or less expensive routes as an example with to assign rates and calculate with engines. Also you can manage and reconcile charges. Please find the Microsoft Documentation for the Module below: https://docs.microsoft.com/en-us/dynamics365/supply-chain/transportation/transportation-management-overview Also I like the video series below from Michael Cobbin which give detail for the TM module from Tech Talk: https://www.youtube.com/watch?v=gqGKgiDEQLk https://www.youtube.com/watch?v=gqGKgiDEQLk&list=PLaKeZD0fHWIp8zD088_6svgMZ5v1CmJGz&index=8 https://www.youtube.com/watch?v=9-gGUxeQSAc&t=1408s https://www.youtube.com/watch?v=gqGKgiDEQLk&t=1456s

Tax Calculation Service (RCS)

      Tax Calculation service helps system to calculate complex taxes between country and locations and EU and multiple tax registration ids. For this purpose you have to setup RCS, enable feature and setup all the scenarios in the tax calculation engine. Not only it helps calculate these but more complex scenarios like calculation of taxes based on margin.     You may find the documentation of Microsoft below and also a video that briefly explains how system works. https://docs.microsoft.com/en-us/dynamics365/finance/localizations/global-tax-calcuation-service-overview https://www.youtube.com/watch?v=B2fN9AHoYnQ