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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Restriction by queries and policy not working

(0) ShareShare
ReportReport
Posted on by 75

Hello guys,

I am trying to create some queries that will restrict records in All purchase orders form, I want to see only PO that belongs to the project with Project ID starting with AB* and that have PO status as Open order. I have created new Query, with the datasource ProjTable, on this data source I have created a new range, AB*. Then in this datasource I have added another one, PurchTable, and on this datasource, I have created new range for Purchase order status field set as Open order. 

Than I have assigned this query

0601.pastedimage1674417554225v3.png 

to the security policy, 

6864.pastedimage1674417431472v2.png

where is the Context Type set as RoleName and the role name is set in the properties as well. The role is then assigned to the user that should be restricted. 

The restriction works fine for the Project ID, the user can see only projects starting with AB, but can see PO with all of the PO status, the range in the query does not affect the PO status. Does someone know, please, why is this happening? I have tried to clear usage data for example, but still the same issue

When I have created the query/policy in this way before, it worked fine, but now I have this issue. 

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    300,733 Super User 2025 Season 2 on at

    Hi Sayid,

    In this policy, the ProjTable is the primary table and determines which records are visible. The additional constrained tables will not inherit ranges from the security query. If you need to have the additional filter for the POs, you will need a second security policy starting with the PurchTable.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 303 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 144 Super User 2025 Season 2

#3
Laurens vd Tang Profile Picture

Laurens vd Tang 91 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans