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)

Delete table index from USR layer using AXUtil

(0) ShareShare
ReportReport
Posted on by

Hi everyone! This is my first quertion to the community, so, I'll try to make my question as clear as possible.

I've added a new index to a table compound by 55 fields at USR Layer. (I think it's the max allowed)

Suddenly AOS crashed, so I restarted it, but when I click over the table, it crashes down again and the AOS Service stops and I have to start it over and over again.

Now, my question is: Is it possible to delete this index from USR layer using axutil? Because when you focus the table within the AOT it crashes.

Sorry about my English

Thanks in advance

Luis.

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    do you have another Instance of AX? if you have same version of AX, you can try following

    export standard object from other system and try to import it in current corrupt system, without touching the infected table.

    I am not sure whether this will fix the issue or not, but its just random thought.

    Also you can try to add this table to a new model using x++ and then you can try to delete this object by axutil

  • Community Member Profile Picture
    on at

    Thanks for your help Sohaib, I tried to import the table as you told me to, but the error stills the same. The AOS crashes and I have to start the service again.

    I have no idea about what's going on here. :(

  • Suggested answer
    Crispin John Augustine Profile Picture
    37,081 on at

    Hi Luis,

    I can suggest an easier alternative.

    Find the repository folder for USR layer in your machine. Navigate to the xpo of the table, open it in Editor and delete the index(es) you want to.

    This is definitely a dirty solution, but you gotta get dirty sometimes!

    Regards,

    Crispin

  • Verified answer
    Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    I wonder why you would even consider creating an index with 55 fields. It's much higher than the limit of SQL Server and even if it was possible, the value of such an index would be negative.

    If you have a backup of your application, restoring it may be the easiest option.

    If you can successfully overwrite the table via .xpo, prepare a version without the index and import it (that's what others suggested).

    You could replace the model - this will work even if .xpo imports fail.

    You could try to delete the index using TreeNode class.

    And you could modify the modelstore database directly, but I don't think you should consider it. It's risky and you would easily get into even bigger problems.

  • Community Member Profile Picture
    on at

    Thanks for your help Martin, I'm affraid I'll have to replace the model, because .xpo import fails too. I know that creating a monster index of 55 fields is not usefull at all, but Microsoft Argentina told us to create it, in order to improve a batch process's performance.

  • Community Member Profile Picture
    on at

    Thanks for your help Crispin, unfortunately, my company doesn't work with source control for ax development.  I'll ask for it. It's really necessary.

  • Suggested answer
    Crispin John Augustine Profile Picture
    37,081 on at

    If you don't have a repository, you can instead make an export, play with the xpo, and re-import it.

  • Community Member Profile Picture
    on at

    I've tried to import the table from cus layer to usr  using xpo but it makes AOS crash too. I think I have no choice but to replace model.

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

    I would throw the problem on those who caused it, unless you're afraid of other brilliant suggestions from them. ;-)

  • Community Member Profile Picture
    on at

    I'm realy afraid, because the the problem was caused for a third party company, a MS gold partner for South America :(

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