Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Create RecID index on Table

(0) ShareShare
ReportReport
Posted on by

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

*This post is locked for comments

  • 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 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 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 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 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 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

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,379 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans