Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

View from AOT query with currenUser() as range

Posted on by Microsoft Employee

Hi, I've created an AOT query in AX 2012R3 with a range where the userId is set to (currentuser()).

Let's say I am logged in as User1. This works fine. I get all the records from the table that where created by the User1. All other user can see their own records as expected when using this query.

However, when I use this query as a datasource in a view I need to synchronise the view with the database in order to see the records of User1. At the same time all other users can see the User1 records as the view is synchronised with currentUser = User1. Please advise how I can make sure the view is only showing the records for the currentUser.

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: View from AOT query with currenUser() as range

    Hi Andre,

    Thanks for the quick reply. Good to read that your findings are like mine.

    Kind regards

    Louis

  • Verified answer
    André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 291,280 Super User 2024 Season 2 on at
    RE: View from AOT query with currenUser() as range

    Hi LouisH,

    This is as far as I have experienced not possible. The synchronization is indeed replacing it with the actual user. You can actually use eXtensible Data Security to constrain the records based on the user (then remove the current range in the view). Another option is to apply a filter on a form or report during runtime.

  • István Orosz Profile Picture
    István Orosz 2,137 on at
    RE: View from AOT query with currenUser() as range

    Hi,

    Would you add some more details please about your query?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans