Hi,
I have create 2 new table: EmployerTypeTable and ListDocTable
An object of EmployerTypeTable can have many object of ListDocTable (one to many)
How can i create implement that in ax2012
thank you
Hi,
I have create 2 new table: EmployerTypeTable and ListDocTable
An object of EmployerTypeTable can have many object of ListDocTable (one to many)
How can i create implement that in ax2012
thank you
It’s trivial. Each record of ListDocTable must contain a reference to the primary key of EmployerTypeTable (= so-called foreign key).
Thank you for replay,
what I have not explained well in my question is how can i create foreign key relationship between two table (one to many)
I 'm try to resolve this by create relation with EDT like this
Table EmployerTypeTable
EmployerTypeTable has two fields AccountId and Name
Two indexes AccountIdx and NameIdx. Both have their AllowDuplicates property set as No and AlternateKey property set as Yes.
EmployerTypeTable 's ReplacementKey property set as NameIdx.
Second table ListDocTable will have two fields Name and AccountId.
Create an Int64 type EDT EmployerTypeTableRefRecId with property ReferenceTable as EmployerTypeTable and Extends as RefRecId
Drop this EDT on ListDocTable .
Click Yes on the prompt
You described some steps, but you haven’t mentioned what problem you have with them.
thank you for replay,
if you can explain me step by step create a foreign key , because my solution does not work correctly
here print sreen of my issue
It seems to me that what you’re using is Int64Edit control, which is wrong. You need ReferenceGroupControl. It should be used automatically when you drag a foreign-key field to form design.