web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Locking down the filter for warehouse on the InventTrans form

(0) ShareShare
ReportReport
Posted on by
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)

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mallesh Deshapaga Profile Picture

Mallesh Deshapaga 1,089

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 200 Super User 2026 Season 1

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans