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 :
Microsoft Dynamics AX (Archived)

Hide Warehouse For all users at Organization

(0) ShareShare
ReportReport
Posted on by

Dears,

I want to hide/block some old closed warehouses form all users. I don't want to delete them as I don't want to use query too.

Any suggestion?

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Sorry I'm not that much expert, If I add this column to the invent location table how that will reflect at the other forms?, Sure I need to write some codes but where?. Can you give more details?

  • Suggested answer
    Hichem.Chekebkeb Profile Picture
    3,371 on at

    The best solution for your case is to use Policies (Record level security)

    Technet explains it very well: https://msdn.microsoft.com/en-us/library/aa570084.aspx

    You can find additional articles over net. 

  • Community Member Profile Picture
    on at

    Thank you, But as I told you I don't want to use query, that will affect on the future when we get new warehouses. As this may affect the other organization is in't?.

  • Suggested answer
    Mahmoud Hakim Profile Picture
    17,887 on at

    you can do that with standard AX functionality without write any codes as the following go

    to product information management /released products/ select your product/manage inventory tab

    and site specific order setting.

    you can stop this site for this product on (sales /purchase/inventory)

    just click override checkbox and tick stop

    site-specfic-order-setting.png

  • Suggested answer
    Andrew Xu Profile Picture
    3,877 on at

    Where do you want to hide?

    If you want to hide them at the form InventLocation, you just need to overwrite the method init() of datasource InventLocation with following code,

    public void init()

    {    

       super();

       this.query().dataSourceName('InventLocation').addRange(fieldNum(InventLocation, InventLocationId)).value(queryNotValue('Your warehouse Id'));    

    }

    If you want to hide them in the drop down list when user is selecting warehouse, you need to modify the code in lookup method to exclude them, just like the code above.

  • Community Member Profile Picture
    on at

    Andrew Xu thanks, Yes that what I want but only work with one ID can you assist for multiple ranges?

  • Community Member Profile Picture
    on at

    I have to do the same for the rest of forms right?

  • Verified answer
    Andrew Xu Profile Picture
    3,877 on at

    For multiple warehouses,

    this.query().dataSourceName('InventLocation').addRange(fieldNum(InventLocation, InventLocationId)).value('!WarehouseId1, !WarehouseId2, !WarehouseId3');

  • Community Member Profile Picture
    on at

    Thank you that awesome, can you tell me more about the lookup methods?

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans