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

Display sales order only for sales taker or sales responsible using XDS

(0) ShareShare
ReportReport
Posted on by 122

Hi. I am trying to get the SalesOrderListPage (All Sales Orders) to display only the sales orders which are created by Sales taker or Sales Responsible. 

I created a query (SalesResponsibleQuerry) with SalesTable as the Data source and range as WorkerSaleTaker, the screenshot below

4314.Query.png

I also created a security policy as below with SalesTable as the primary table 

Security-Policy.png

Constraint-Table.png

I am getting the following error: "Invalid value (user) specified in the query predicate."

Appreciate your insight and thanks in advance. 

I have the same question (0)
  • Verified answer
    GirishS Profile Picture
    27,825 Moderator on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    Hi Vijay,

    WorkerSalesTaker and WorkerSalesResponsible are RecId field. In the query range you are mentioning current user id. I think that's why you got the above error. Try the below range for getting the current worker RecId.

    (HcmWorkerLookup::currentWorker())

    Thanks,

    Girish S.

  • Suggested answer
    JamesT Profile Picture
    341 on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    Hi Vijay

    You can potentially do this using Saved View and Advanced filtering, without having to do any development.

    • Navigate to the Sales order List page
    • Create Advanced filter

    pastedimage1684194744728v1.png

    • Create Saved View and publish to all users

    Regards

    James

    Regards

    James

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    Hi James,

    But I think you cannot export the advance filter or sort personalization and publish to all users.

    Thanks,

    Girish S.

  • JamesT Profile Picture
    341 on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    Hi Girish,

    I tested with another user and it works with no issues.

    Regards

  • VJ VM Profile Picture
    122 on at
    RE: Display sales order only for sales taker or sales responsible using XDS
    [quote user="JamesTerr"]

    Hi Vijay

    You can potentially do this using Saved View and Advanced filtering, without having to do any development.

    • Navigate to the Sales order List page
    • Create Advanced filter

    pastedimage1684194744728v1.png

    • Create Saved View and publish to all users

    Regards

    James

    Regards

    James

    [/quote]

    Hi James. I have tried this before but the views can easily be switched by the user to "Standard View" and all the info will be available again. Also, I have tried but no security can be applied over views or to only make a certain view available. So this defeats what we are trying to achieve. With XDS, I am trying to permanently limit the information available to the user on this form by his login user id. This used to be Record Level Security on AX 2009 and no development was required but no longer the case on D365FO. 

  • Suggested answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    Hi Vijay, Have you checked this old thread

    community.dynamics.com/.../360487

  • VJ VM Profile Picture
    122 on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    Hi Mohit. Yes, I have tried this but it does not work for me. I am also wondering if I made any mistakes in selecting the table. The page is SalesTableListPage but I reckon this is SalesTable itself since I cannot find a table such as SalesTableListPage.

  • VJ VM Profile Picture
    122 on at
    RE: Display sales order only for sales taker or sales responsible using XDS
    [quote user="GirishS"]

    Hi Vijay,

    WorkerSalesTaker and WorkerSalesResponsible are RecId field. In the query range you are mentioning current user id. I think that's why you got the above error. Try the below range for getting the current worker RecId.

    (HcmWorkerLookup::currentWorker())

    Thanks,

    Girish S.

    [/quote]

    Hi Girish. I just tried this and it works. But it applies to everyone. How do I make this a role-specific case? 

  • GirishS Profile Picture
    27,825 Moderator on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    Under Security Policy property - You can set the role name property to specified role. It will be applicable to the role mentioned in the role name property of security policy.

    Thanks,

    Girish S.

  • Suggested answer
    Mohit Rampal Profile Picture
    12,563 Moderator on at
    RE: Display sales order only for sales taker or sales responsible using XDS

    You are right, there is no SalesTableListPage table, the filter should be on SalesTable DataSource at SalesTableListPage form level.

    Please check CoC on SalesTableListPage in this article.

    www.linkedin.com/.../

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 2,122

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 646 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans