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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to disabled user in AX2012?

(0) ShareShare
ReportReport
Posted on by 72

How to disabled the users? Can it be disabled?

Enabled.PNG

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mea_ Profile Picture
    60,286 on at

    Hi FuHu,

    Double click on a record you want to disable, to open details page. There you can disable user clicking on a "Enabled" filed in edit mode.

  • Douglas Noel Profile Picture
    3,905 on at

    Yes,

    set enabled to unchecked within details for user. But keep in mind: The user has to exist in AD, otherwise you'll get an exeption on trying to disable him or her. In that case you have to disable by code. Most often users are deleted from AD without disabling or deleting them from Ax prior. In that case you can't 'deactivate' this non existing user anymore from within the GUI, only delete.

    regards Douglas

  • FuHu Profile Picture
    72 on at

    When click on "Enabled" its prompt out this

    Enablederror.PNG

  • Mea_ Profile Picture
    60,286 on at

    That's what Douglas was talking about.  You cannot disable it from UI now, ask developer to disable it using a job.

  • Suggested answer
    startax Profile Picture
    1,845 on at

    Hi,

    static void disableUsers(Args _args)

    {

       UserInfo userInfo;

       ;

       //a00008 is the user id which we want to disable.

       while select forUpdate userInfo where userInfo.id == 'a00008'

       {

           if(userInfo)

           {

               ttsBegin;

               userInfo.enable = 0;

               userInfo.update();

               ttsCommit;

           }

       }

    }

  • FuHu Profile Picture
    72 on at

    thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans