Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

what is the role of field on table"InstanceRelationType"

(0) ShareShare
ReportReport
Posted on by 5,943

Dear All,

what is the role of field on table"InstanceRelationType" in table Inheritance?

1.what kind of value it stored?

2. how it's work practically?

Please give me more shed on this.

Thanks!

Arpan

*This post is locked for comments

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: what is the role of field on table"InstanceRelationType"

    This is just one of a long list of reasons why you shouldn't access database directly (here are some others). I strongly recommend you change your design. For example, consider using DIXF instead.

  • DiepBH Profile Picture
    DiepBH 115 on at
    RE: what is the role of field on table"InstanceRelationType"

    Im looking into Table inheritance and transfer data directly by SQL. I got issue data will not map if destination database has different table ID for derived table, I can update new Table ID to base table in this situation.

    So I want to find out is there any way to get list of base table and derived table to update InstanceRelationType?

  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: what is the role of field on table"InstanceRelationType"

    Table ID shouldn't change. Can you explain your scenario, please?

  • DiepBH Profile Picture
    DiepBH 115 on at
    RE: what is the role of field on table"InstanceRelationType"

    Dear Martin,

    field InstanceRelationType store TableID, so is there any class to update InstanceRelationType field (or any field in other table store TableID) when Table ID change?

  • @rp@n Profile Picture
    @rp@n 5,943 on at
    RE: what is the role of field on table"InstanceRelationType"

    Dear All,

    Can you please verify the above process of Table Inheritence is correct or not?

    Please give me more shed on this.

    Thanks!

    Arpan

  • @rp@n Profile Picture
    @rp@n 5,943 on at
    RE: what is the role of field on table"InstanceRelationType"

    Thanks Martin,

    Can you please let me know the above "table inheritance process"which i did is correct?

    Thanks!

    Arpan

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: what is the role of field on table"InstanceRelationType"

    Let me quote the documentation which I asked you to read: "The system uses a field on the TabPet base table to record the table ID of which ever derived table corresponds to each base table row. The InstanceRelationType property tells the system which field must store the table IDs."

  • @rp@n Profile Picture
    @rp@n 5,943 on at
    RE: what is the role of field on table"InstanceRelationType"

    Thanks Martin

    I did the Table Inheritance with Two tables : 

    For example :

    1. Base Table : Fields : StudentID, RollNumber, Class

    2. Derived Table : Fields : Marks, Division

    Steps :

    1. In Base Table properties set to Support Inheritance = Yes

    2. Then creating int64 field in Base table. Name the int64 field as "InstanceRelationType".

    3. In Base table set the InstanceRelationType property to InstanceRelationType

    4. and create few other fields as needed.

    5, In Derived table , we are setting two properties Extends and Support Inheritance

    6. In extends we set "BaseTable" and Support Inheritance set to Yes

    ****

    Then i open Derived Table

    I saw the fields from Base table is automatically populated in to Derived table.

    It's showing fields in Derived table:

    StudentID, RollNumber, Class,Marks, Division 
    Note : here StudentID, RollNumber, Class fileds from base table.

    ***** Then i am creating new records in Derived table .

    Then i open Base table, i saw data is automatically replicated in the base table as we are created records in the derived table.

    Note : I noticed two things :

    InstanceRelatiponType holds "Table ID"of Base table which is also same in Derived table in field InstanceRelationType.

    I think the field InstanceRelatiponType  is used for making relation between 2 tables (Base and Derived).

    Please let me know if i missed any thing?

    Please give me more shed on this.

    Arpan

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    RE: what is the role of field on table"InstanceRelationType"

    Make sure you read the documentation page Table Inheritance Overview (and child pages). It should answer your questions.

    If not, please explain what exactly you don't understand.

  • Suggested answer
    Vilmos Kintera Profile Picture
    Vilmos Kintera 46,149 on at
    RE: what is the role of field on table"InstanceRelationType"

    Let me show you how to Google in the documentation using the site keyword in order to find answers:

    [View:http://lmgtfy.com/?q=ax+InstanceRelationType+site%3Amicrosoft.com:750:50]

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans