Our team is in the middle of a project to migrate from AX 2012 to D365, and our dev team has taken an approach to make all development changes, including security, in AOT and build it to each environment. It's a fine approach but obviously there is overhead in having to wait until the next day for the AOT changes to be built. In my security tests, I have made a few changes in one of our test environments using the Web UI to see if the changes will work. It's been a good approach and I like how immediate the security changes take effect. I ran into an issue though and would like your input.
I read that the Web UI security changes take precedence over any AOT changes, and it appears I have proven that's the case with a recent security change, but I'm not sure on how to fix, or stop the web UI security changes from taking precedence over the AOT change I made. Here is the scenario:
We have two test environments, Test1 and Test2. Using the Web UI in Test2 I made a security change to a privilege and published it, allowing a button control to be visible on a custom form. It was a quick change and allowed me to see if it would work, and it worked perfectly. Knowing our team expects these changes to be made only in AOT, I changed the form control privilege back to its original setting in the Test2 Web UI, then published it so the button no longer appears.
Then I made the same security privilege change in AOT and our IT team built it to both of the Test1 and Test2 environments last night. This morning I can see that the button is now visible in Test1, so the AOT security privilege change properly deployed to that environment. But the button is still NOT visible in Test2 where I had been making the security changes using the Web UI. The IT team verified last night's deployment was successful to both Test1 and Test2. So it appears that my Web UI change to disable the button from being visible is taking precedence over the AOT deployment.
So my question is, how can I have the AOT changes be deployed to the Test2 environment? Is this change forever "locked" in Test2 where the Web UI will take precedence of any security changes for this specific privilege? I may be missing something obvious on this but I wanted to reach out to hear any thoughts on how to fix this, and any guidance on best practices are much appreciated.
Thank you,
Scott