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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Problem with XDS restricting all records

(0) ShareShare
ReportReport
Posted on by 10

I have created a new table, that contains the RefTableId & RefRecId linked to CustTable.TableId & CustTable.RecId.

Then I created a simple query for the new table with no ranges at all, and a new security policy using the new query with Constriction type = RoleProperty and a ContextString, and finally a new role having the same ContextString as the security policy. I assigned the new role to a test user.

First I just looked at customers, and it didn't show any customers.

Then I tried to remove the ContextString from the new role, and then it shows all customers. 

Then I created a new form joining customers with the new table, and it showed only the customers existing in the new table.

Then I added the ContextString again, and then it doesn't show any customers in either CustTableListPage, or my new test form.

So I reasoned that the problem is somehow the query, but since I have no ranges on it, then I don't understand what could be wrong?

Has anybody experienced something like this?

I have the same question (0)
  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    The behavior of your new form looks as expected.

    Regarding CustTableListPage, it depends on what you did there, because you didn't mention it at all. If you didn't use the table there, restricting it shouldn't have any effect to the form that doesn't refer to it in any way. Therefore I assume that you're somehow using the new table in CustTableListPage. Please tell us more about it.

    By the way, which version of AX are you using?

  • Allan Lillebæk Profile Picture
    10 on at

    D365FO 10.0.22.

    I didn't do any modifications to CustTableListPage, but I expected my security policy to be applied to the query in CustTableListPage, due to the link between my new table and CustTable, and it also appears to be, since I don't see any records, when the ContextString is specified on my new role, hence the security policy is activated.

    My problem is, that I expected to see the same customers in CustTableListPage, when the security policy is in action, as I do in my new form, but it's like I don't have access to the new table, when the security policy is activated.

    To test this, I added a button, that loops over the new query and info the data, and when the security policy IS NOT in action, then it shows the data from the new table, and when it IS in action, then it shows nothing.

    So it's like I don't have access to any of the records in the new table, when the security policy is activated, but since there's no ranges specified on the query, then it should return everything.

  • Martin Dráb Profile Picture
    239,040 Most Valuable Professional on at

    Moved from Dynamics AX forum.

    It's still not clear to me where CustTable comes to the picture. Are you using it in your XDS query?

  • Allan Lillebæk Profile Picture
    10 on at

    I added CustTable as a Constrained table on the Security policy, but when I specify the relation to use, it gives an error, saying that this relation doesn't exist, even though I created it on an extension for CustTable.

    I got a little further though, since in my desparation I had added a relation from my new table to CustTable, and this was a mistake, which has now been removed, so now my TEST button shows the contents of the new table, and my new form shows the customers present in the new table, so currently I think my only problem is, that I cannot specify the relation on the Constrained table on the Security policy.

  • André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at

    Hi Allan,

    Can you share technical information about what you have done so far? Have you tried to set a relation with an expression?

  • Allan Lillebæk Profile Picture
    10 on at

    Hi André

    I tried to share the technical info, in my initial question, and the following replies :0)

    I only tried to set the relation on the Constrained table on the Security policy, which I cannot.

    What I did since my last post, was to create a Simple query on CustGroup (example from the Internet), and let the Security policy have CustGroup as the Primary table, and here I can specify CustTable as the Constrained table, and specify the relation CustGroup, and this works like a charm.

    What do you mean, setting a relation with an expression?

    Thanks, Allan

  • Allan Lillebæk Profile Picture
    10 on at

    Hi André

    I can see, that you already replied on this topic 3+ years ago (community.dynamics.com/.../xds---standard-table-relations-not-showing-for-constrained-tables), and found that there was an issue, that both you and the author would report to Microsoft.

    Either none of you did (?), or Microsoft didn't solve the issue in D365 :0(

    /Allan

  • André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at

    Hi Allan,

    In the post from 3+ years ago you provided, I shared the option for the relation expression:

    When you add a constraint relation, you can provide a table. Then in the value field enter a relation in the next format:

    (ConstrainedTable.Field == ParentTable.Field)

    I don't know if the author did report the issue. At least, he didn't updated the question with a possible reply from Microsoft. I can't find any details in my emails anymore. Anyway, try the contrained relation (expression).

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 663

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 439 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 337 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans