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, ...
Answered

Lookup search for inventLocationid with XDS policy

(0) ShareShare
ReportReport
Posted on by 928

Dear All,

I have already implement XDS Security Policy for invent location and is working fine.

dd.jpg

In my transfer order form, I want to restrict my fromWarehouse lookup and it is working fine 

For Towarehouse I bypass XDS by adding the below code.

public void lookup(FormControl _formControl, str _filterStr)
{
    XDSServices xXDS = new XDSServices();

    xXDS.setXDSState(0); // Disable XDS
    super(_formControl, _filterStr);
    xXDS.setXDSState(1); // Enable XDS
}

It is working fine for lookup but when I try to filter lookup by ctrl G It did not find the restricted warehouses.

Please help me in this regard how can I override Filter or search method to bypass XDS.

regards,

Khurshid Wali

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    304,506 Super User 2026 Season 1 on at

    Hi Khurshid,

    What exactly do you mean with the filtering that it did not find the restricted warehouses? Is it in the lookup form or the transfer orders? Did it find other warehouses? Can you possibly also share a screenshot?

  • Khurshid Wali Profile Picture
    928 on at

    Thank You Andre Arnaud de Calavon,

    Screenshot_5F00_11.jpg

    Here Lahore is restricted through XDS (restricted warehouse) but I have bypass xds for To warehouse. which means Lahore is available in lookup but when I search through ctrl+G It did not find it.

    how to override this search option.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    304,506 Super User 2026 Season 1 on at

    Hi Khurshid,

    I do understand that Lahore should not be visible in the From warehouse, but it should be visible in the To warehouse.

    Your coding is relaxing the XDS policy on the form, but a new instance is created when opening the lookup form. I do think you can solve it with creating a lookup in coding using x++ instead of using the standard lookup form. You can also create a new lookup form which you can link to the field for lookup on the To warehouse. Then on this new lookup form, you can use coding to disable the XDS policy temporary.

    I do think the easiest it to created a lookup with x++ coding. Here is an example: community.dynamics.com/.../ax-2012-create-lookup-in-x

  • Khurshid Wali Profile Picture
    928 on at

    Thank You Andre,

    As Per your suggestion I have created a lookup form

    like this.

    daxbeginners.wordpress.com/.../

    And bypass executes query method for xds and now search is also working.

    regards,

    Khurshid Wali

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 694

#2
André Arnaud de Calavon Profile Picture

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

#3
CP04-islander Profile Picture

CP04-islander 337

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans