Dear all,
Introduction
I am quite new to the world of managing Microsoft Dynamics AX, and hence a basic question.
As I did not find the answer to my question on this forum, I thought it might interest others as well.
Question
Is it possible to disable multiple users at once without using scripts?
Background information
I know users can be disabled by double clicking on a user, clicking Edit and unchecking the Enable box.
This is, however, a lot of work to do for about 400 users. (400 as I want to disable almost all users in the ACP environment, to be enabled only if necessary).
So: is there a faster way to do this? I have a feeling there should be, but have been unable to find it.
Thanks in advance for any tips or advice!
*This post is locked for comments
To dis enable :
update userinfo set [enable] = 0 where ID <> 'Admin'
To enable :
update userinfo set [enable] = 1 where ID <> 'Admin'
Anton, forgive me for being a noob but..how do I run this in D365?
That is a great addition, Anton, although I hope this will not be necessary to use this script too often ;)
Hi Rogier, here two jobs to disable and enable all users. If you are going to use it often, you could put this code in classes and add the menu items to the users form.
static void AV_disableAllUsers(Args _args) { UserInfo userInfo; update_recordSet userInfo setting enable = NoYes::No where userInfo.id != 'Admin'; info("Done!"); }
static void AV_enableAllUsers(Args _args) { UserInfo userInfo; update_recordSet userInfo setting enable = NoYes::Yes where userInfo.id != 'Admin'; info("Done!"); }
Thank you, Rik, I knew there should be a quick solution to this
I do not think it's possible without scripting (either a Job or a T-Sql script); that is without having to actually 'click' the number of times of the users you are going to disable.
You could select the option "Edit in Grid" from the form. This way you still need to edit all the users but you'll manage in 10 minutes or less.
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156