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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

XDS not applying on constrained tables

(4) ShareShare
ReportReport
Posted on by 122
Hi. I have an XDS policy to constrain the SalesTable based on the primary table HcmWorker with table relation WorkerSalesTaker_FK. 
 
It is linked to the role of "Salesman" and is based on query that specifies the range as personnel number in HcmWorker. 
 
This is to constrain the sales table to show the sales orders under the specific salesperson only. This works fine perfectly. 
 
I added the same constrain for the SalesQuotation table (Table relation: WorkerSalesResponsible_FK or WorkerSalesTaker_FK) and PurchReq table (Table relation: Originator) with primary table HcmWorker, to allow the salesperson to see his sales quotations and his purchase requisitions only. 
 
However, the tables are not being constrained and it still shows all the sales quotations & purchase requisitions with other people as Sales Taker / Sales Responsible. 
 
Where am I going wrong? Appreciate your input. Thanks!
Categories:
I have the same question (0)
  • VJ VM Profile Picture
    122 on at
    XDS not applying on constrained tables
    Hi... Anyone? 
  • Suggested answer
    Justin Kruger Profile Picture
    183 on at
    XDS not applying on constrained tables
    Hi,
     
    Could you share some more details ?
     
    What does your query object look like, what are the ranges ?
     
    What is the Context Type of your policy  ? If it is RoleProperty, did you specify the context string of your role in the policy ?
     
    Did you mark the Constrained Table property in your policy as true ?
     
    There are a couple of things to check but we do not know what your XDS objects look like.
  • VJ VM Profile Picture
    122 on at
    XDS not applying on constrained tables
    Hi @Justin Kruger. Thanks for getting back. 
     
    Please see the below policy with the constrained Table SalesQuotationTable and the Table relation WorkerSalesTaker_FK.
     
    Primary Table as HcmWorker with role UIC_XDS_Salesman and Query SalesRespQuery_Arun. Also please note that the constrain works fine for tables SalesTable and CustTable. But does not work for SalesQuotationTable & PurchReqTable.
     
    The query is as follows with range as personnel number and 000009 as the value for the selected user.
     
     
     
    The role is as follows. 
     
     
    Please have a look and let me know. Thanks again! 
  • Suggested answer
    Justin Kruger Profile Picture
    183 on at
    XDS not applying on constrained tables
    Hi VJ,
     
    I replicated this on my end and for me it is working fine.
     
    I constrained SalesTable and SalesQuotationTable on WorkerSalesTaker_FK, along with a query with a primary table of HCMWorker restricting 1 specific personnel number, both my SalesTable and SalesQuotationTable are being constrained correctly.
     
    My XDS object properties are identical to yours, so the only thing that I can think of is that there is a conflicting XDS policy constraining content on the SalesQuotationTable.
     
    Take the user account you are testing with or create a new test user in your VM and assign a standard role that grants access to Sales quotations, then assign your XDS role and see if it works. Hopefully the standard roles are not being constrained as well.
  • VJ VM Profile Picture
    122 on at
    XDS not applying on constrained tables
    Many thanks @Justin Kruger for testing this scenario with me. 

    I could not find any other XDS policy that could conflict with the Sales Quotation table or the Purchase Requisition table. I also found something weird now. 
     
     
    I am logged in as my test user, "Arun." The system displays all sales quotations but hides the Sales Taker/Sales Responsible names, except for Arun's own quotations. For example, quotation 006918, which belongs to a user named AHMED, appears in the list, but the Sales Responsible name is missing when viewed from Arun’s profile. However, for Arun’s own quotations, such as 006919 and 006911, the Sales Responsible name is visible. This suggests that the restriction is being applied only to the Sales Responsible name, rather than to the entire quotation associated with that name.
     
    However, if I login as my user (admin), you can see that all the names are appearing. 
     
     
     
    Any idea about why such a behavior? 
     
     
  • Suggested answer
    Justin Kruger Profile Picture
    183 on at
    XDS not applying on constrained tables
    Hi VJ,
     
    Just want to confirm you did the user role test I suggested and the result was the same ?

    If not, make sure there are no other policies linked to your XDS role, and remove all other roles from your test user apart from the XDS and a standard AR role, something like Sales Clerk should work. Then check your Sales Quotes and see what the result is.
  • Suggested answer
    Subhad365 Profile Picture
    21 User Group Leader on at
    XDS not applying on constrained tables
    Hi, 
    Can you also try doing this: create a View using necessary tables, and creating necessary ViewMethods in it and then using it in the Policy, just as outlined by blog previously wrtiten by me :=)
  • Verified answer
    VJ VM Profile Picture
    122 on at
    XDS not applying on constrained tables
    Hi @Justin Kruger. Thanks for getting back. Yup, I tried the exact thing you said. Created a new role and added the policy and query, constrained only the SalesQuotation table and it would not work. It just removes the name like in the screenshot I shared earlier.
     
    The role I used for this earlier with XDS was a copy of a sales-related role like SalesRepresentative. This time I used an entirely new empty XDS role, deleted all other roles, and added just Sales Clerk as you said, but the same result.

    I also tried synchronizing the database and rechecked if my updates were correctly moved to DevOps. Everything seems fine but it won't work for some unknown reason. Is there anything else I can try? Thanks!
  • Verified answer
    Justin Kruger Profile Picture
    183 on at
    XDS not applying on constrained tables
    Hi VJ,
     
    Thanks for testing.
     
    Unfortunately the only time I have seen strange behaviour like this where fields display blank and the table is not constrained properly from XDS is when there is some conflicting policy or query affecting the same role, or multiple conflicting XDS roles are assigned to the same user.
     
    Just to give you an idea I am able to replicate your issue to some degree by creating a second query and policy constraining DirPartyTable. I then assign this policy to the same role constraining HCMWorker. This results in my SalesResponsible field being blank on sales quotes and my table is not constrained correctly.
  • VJ VM Profile Picture
    122 on at
    XDS not applying on constrained tables
     
    Thanks for your support. I just noticed that the tables are being successfully constrained on the development environment on the USMF company (I don't have my DB imported on the Dev system), both with the new role and my earlier one.
     
    However, the issue happens when I push it to the UAT environment. Yesterday I removed all other roles and the behavior was the same on UAT but today I was able to successfully apply it on Dev after creating a test user and applying the role to that user.
     
    If something was conflicting, it should do the same on the Dev machine as well right? Are there any other environment based scenarios we should take into account? 
     
     
     
     

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 813

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 566 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans