Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Create RecID index on Table

Posted on by 5,901

Dear All,

As I know that on Table, create RecID index is set to Yes is part of BP.

If I create new index under index like "StudentIdIdx" and also set "CreateRecidIndex" set to Yes then which one will work?

Because both are index.

Please give me more shed on this.

Thanks!

Arpan

  • Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: Create RecID index on Table

    Hi,

    NP..could you mark the helpful answers as verified.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: Create RecID index on Table

    Thanks Chaitanya

  • Verified answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: Create RecID index on Table

    Hi,

    Yes.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: Create RecID index on Table

    Thanks Chaitanya,

    Yes, Surrogate key(RecId) is used by database engine based on property "CreateRecidIndex" set to Yes or No and Primary key will work based on index property which we have set.

    So, both are working together based on his own nature.

    Right?

    Thanks!

    Arpan

  • Verified answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: Create RecID index on Table

    Hi,

    Just for an example you can check these properties on SalesTable where CreateRecIdIndex is set to Yes and PrimaryIndex is set to SalesIdx.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: Create RecID index on Table

    Thanks Chaitanya

  • Verified answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: Create RecID index on Table

    Hi,

    Its recommended to set this property to Yes, as database engine will use surrogate key in case of some complex queries. You can have primary index, by setting the property PrimaryIndex to name of your Index even though createRecIdIndex is set to yes.As far I know its fine to have both.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: Create RecID index on Table

    Thanks Chaitanya

    So, if I set CreateRecidIndex = Yes then Primary index should be "Surrogate key" default.

    If set to No, then I can use any other primary key instead of Surrogate key.

    Is't correct?

    Please give me more shed on this.

    Thanks!

    Arpan

  • Verified answer
    Chaitanya Golla Profile Picture
    Chaitanya Golla 17,225 on at
    RE: Create RecID index on Table

    Hi,

    As I mentioned RecId index is a surrogate key i.e default primary key(index) provided by the database. Primary Index is one where AllowDuplicates is set to No and Mandatory is set to Yes. Yes, if you set allow duplicate to yes on index studentIdIdx it will allow duplicates else not, it depends on your table and index design.

  • @rp@n Profile Picture
    @rp@n 5,901 on at
    RE: Create RecID index on Table

    Thanks Chaitanya

    As I understand , RecID index is actually provide us speedup to fetch record from database and

    " StudentIdIdx" if I set allow duplicate NO, then it will not allow duplicate records.

    If "StudentIdIdx " allow duplicate set to Yes then it will allow us to enter duplicate records nothing more than that.

    Is't correct?

    Please give me more shed on this.

    Thanks!

    Arpan

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,126 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans