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

Manage ERP with Success - Blockers of Success

  To manage an ERP process with success is not easy at all. Even there has been processes that have been published by companies, it is mostly depend on the people. In this blog , I am going to share the reasons I see as blockers of during the projects. This is not a scientific measure but just my opinions. Sales Team:  ERP project starts from even before the sales documents are finalized. So company needs (not user/not management etc.) need to be understood wisely and to be checked if the tools can manage these needs and details need to be documented in the contract. Expectations:  Unfortunately, ERP is a software but not a hardware. So expectation management is very important. If it was a hardware, then you will be able to return and to document specific details.  Project Team:  By project team, mostly we understand the consultancy firm but project team does consist of also from customer project managers, users, power users etc. All project team need to be well...

Allocation ways in D365 FO

 When we say allocations of expenses through accounts and dimension, there are various ways that can be used in D365 FO. In this blog you can find these ways and their differences from one to another. Cost Accounting Module:  If you do not need/require to post any transaction or you think that there will be too many transactions appear on voucher transactions, then you can use cost accounting module to report on your balances. This module works separate from the GL module. Data is transferred from GL module and you prepare your allocation rules in this module and do your reporting. also you can use this module for to report different versions. Allocation Rules : You can define allocation rules and within the period you want to use, system will allocate the balance to the relevant account and dimensions. The pros of this type is that, you can trigger and change the rules whenever you want to . The cons of this type is, you need to trigger each rule one by one, wait for the repo...

Fast Track Recognized Solution Architect

      You may be a fast track recognized solution architect. Fast track is best practices to succeed on the project.(Called Success by Design) This process is documented by the fast track solution architects. When applied to be a fast track solution architect, evaluation is done by D365 engineering team.      Earning Criteria The architect must be nominated by the partner Must have a minimum of 5 years of experience with Dynamics CRM or ERP products Must have a minimum of 3 years of experience as a solution architect Must be the lead architect on at least 2 FastTrack governed customer implementation projects Must be responsible for the architecture and design of at least 2 FastTrack governed customer implementation projects Even if you can not fill these requirements above, you are still able to read the detailed documentation from the links below to succeed. https://docs.microsoft.com/en-us/dynamics365/fasttrack/implementation-guide/overview https://www.d3...