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 :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Locking down the filter for warehouse on the InventTrans form

(2) ShareShare
ReportReport
Posted on by 8
Hi
 
I am trying to lock down the filter on the InventTrans form so that it cannot be changed. Here is my code:
 
/// <summary>
/// InventTrans form extension class 
/// </summary>
[ExtensionOf(formStr(InventTrans))]
internal final class InventTrans_Form_Extension
{
    /// <summary>
    /// Extension of init method of InventTrans form
    /// </summary>
    public void init()
    {
        QueryBuildDataSource qbds;
        QueryBuildRange qbr;

        next init();

        qbds = InventDim_ds.queryBuildDataSource();
        qbr = SysQuery::findOrCreateRange(qbds, fieldNum(InventDim, InventLocationId));

        if (qbr)
        {
            qbr.status(RangeStatus::Locked);
        }
    }

}
 
When I debug the code it does get to the line with qbr.status(), however I am still able to change the filter for the warehouse.
 
Can anyone point me in the right direction for what I am doing wrong please?
 
Thanks,
Joe
 
I have the same question (0)
  • Laurens vd Tang Profile Picture
    4,677 Super User 2026 Season 1 on at
    Hi Joe,
     
    Can you maybe explain what you want to achieve with "to lock down the filter on the InventTrans form"? 
     
    Best regards,
    Laurens van der Tang
  • JB-27021626-0 Profile Picture
    8 on at
    Hi Laurens 
     
    I want to stop users from changing the filter for the warehouse
     
    Joe
  • Suggested answer
    Mallesh Deshapaga Profile Picture
    1,817 on at

    Hi,

    Are you looking to lock down the warehouse field on the Inventory Transaction form? is this correct navigation for your requirements ?

     
    If so, you can personalize the form, create a custom view selecting the "Hide", and publish it to the users. This will prevent them from seeing the warehouse field.
  • JB-27021626-0 Profile Picture
    8 on at
    Thanks Mallesh
     
    The customer wants to be able to see the warehouse field, but not to have access to change the filter on it
  • Laurens vd Tang Profile Picture
    4,677 Super User 2026 Season 1 on at
    Hi Joe,
     
    Thanks for the answer. Why should the user not be able to change the filter? 
     
    Best regards,
    Laurens van der Tang

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 > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 304

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 189 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans