web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Update table index using table extension

(0) ShareShare
ReportReport
Posted on by

I create a table extension to add extra fields to a standard table . I need to include these new fields in the index that is already created on the table with allow duplicate no , how can I update the index since I cannot add any fields also I cannot update index properties , is there any work around using table extension not customization ?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Changing existing index isn't supported in extensions in the moment. You can create new indexes, though.

  • maram fraij Profile Picture
    on at

    how can I stop the effect of the already existing index ?

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Again, changing existing indexes through extensions is not supported.

  • Sheikh Sohail Profile Picture
    6,125 on at

    This piece of code I found in MS hotfix...we need to test it before applying any where...
    It seems during deployment & at db sync process it will be executed.

    xyz.png

    I will write the detail blog on this topic very soon

  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at

    Sohail, you can read about this framework in How to Write Data Upgrade Scripts for Microsoft Dynamics AX.

  • Sheikh Sohail Profile Picture
    6,125 on at

    Martin, Thank you very much, will ping you for help if i stuck during implementation

  • JonathanDries Profile Picture
    35 on at

    Hi, is there any update on this one?

  • nmaenpaa Profile Picture
    101,162 Moderator on at

    I don't think this limitation on table extensions will be removed by Microsoft.

    Changing standard unique indexes would potentially break every place in the system that trusts the original index definition (for example find and exist methods).

  • JonathanDries Profile Picture
    35 on at

    I do understand the risk of willing to do this. But the way it is working now, it's impossible to extend the index with an extra extension field.

    Now we've created a new index in the table extension, containing the original unique index fields and an extra field but this will never do the trick, unless the original index is changed to non-unique.

    Our current workaround is to set the index uniqueness to false in the original table, and forcing the uniques through code (in the validateWrite method), wich can be overruled in extension package. But hereby we lose the possibility to use the original key as a replacement key so it's not ideal.

  • maram fraij Profile Picture
    on at

    Dear JonathanDries, 

    Regarding your workaround (Our current workaround is to set the index uniqueness to false in the original table) , how do you apply this since all index properties are not editable in table extension?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans