Notifications
Announcements
No record found.
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
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?
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.
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?.
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
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.
Andrew Xu thanks, Yes that what I want but only work with one ID can you assist for multiple ranges?
I have to do the same for the rest of forms right?
For multiple warehouses,
this.query().dataSourceName('InventLocation').addRange(fieldNum(InventLocation, InventLocationId)).value('!WarehouseId1, !WarehouseId2, !WarehouseId3');
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2