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 :
Small and medium business | Business Central, N...
Suggested Answer

Access Restriction of Location Items

(0) ShareShare
ReportReport
Posted on by 224

Dear Team,

How we can Restrict of Location items to a specific User

Eg: We Have two locations  Eg : Location -DELHI (with Branches- Apple, Orange) and another Location- Mumbai (with branches- Green and Yellow).so there are two users we can Tom and Jerry , TOM should only have the access item in the Location DELHI (and its branches) and JERRY should have the access of ITEMS in MUMBAI Only. (should not able to access other Person Location items)

How we can set this restrictions. kindly requesting the suggestions on this 

I have the same question (0)
  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    For that purpose you should look into using  security filters:

    docs.microsoft.com/.../security-filters

  • LearnBC Profile Picture
    224 on at

    Thanks for your kind Reply. 

    am new to BC, i have another doubt  also, 

    if both TOM and Jerry is Using Same User Groups and Permissions, then in this case what we need to do

    Is this is the Correct way to Restrict the access of another location item. (pls correct me)

    LOC1.jpg

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    Welcome to be BC world!

    I think you should put Tom and Jerry in different user groups so you can assign different security filters to them.

    If you have a default location for each Item on the Item card you should set the filter on the Item table.

    If the same Items are sold from all locations and you need to restrict them for selling at different locations we need another approach.

    So if you can detail a little more how you have registered your items and locations it would be a better base for helping you further

  • LearnBC Profile Picture
    224 on at

    Thankyou,

    while making the Purchase Order itself, we Mentioned that this item should come on which location based on the Project/Requirement. Most of the times items comes in Delhi Location, (if reqd later do the transfer out to Mumbai). Means any item can come in any of the location also.

    So once item is reached on Delhi (Tom) and Mumbai(Jerry) locations, then they should able do the transactions on their location items only.

    pls do let me know, in which method we can follow to complete the requirement

    Thank you again

  • LearnBC Profile Picture
    224 on at

    is this is the right way to get the desired result. pls let me know what is the issue in this or How we can do it

    pageextension 62006 "Location Item Restrict" extends "Item Ledger Entries"
    {
        trigger OnOpenPage()
        var
            Items : Record "Item Ledger Entry";
            myint : Integer;
           Confirm: Label 'You have No access On Another Location items';
            users : Record "User Group Member";
           begin
               
                Items.Reset();
                if (UserId = 'TOM' ) then
                Items.SetFilter("Location Code",'Delhi');
                if (UserId = 'Jerry') then
                Items.SetFilter("Location Code", 'Mumbai');
                else
                CurrPage.Update();
           end;

           end;
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi LearnBC ,

    Can you please try this? I have not checked that. please let me know.

    pageextension 62006 "Location Item Restrict" extends "Item Ledger Entries"

    {

       trigger OnOpenPage()

       begin

           if (UserId = 'TOM') then

               rec.SetFilter("Location Code", 'Delhi');

           if (UserId = 'Jerry') then

               rec.SetFilter("Location Code", 'Mumbai');

       end;

    }

  • LearnBC Profile Picture
    224 on at

    Hello Dear,

    Thanks for the update.

    Right now, while going to items and clicking on inventory -its showing correct location data only (means one location items only) BUT

    when the user user goes to transfer orders, he can able to select the item from another location also.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi,

    In that case you can put the same logic as well in the transfer order page.

  • LearnBC Profile Picture
    224 on at

    Okay...

    i have 2 queries..

    a) right now on items, while clicking on the total stock itself it is not allowing to go inside

    b) , how we can put the options for getting teh data of sub branches means (in location Delhi. Branches like reg green etc)

    as you said, if we give same logic on transfer order page, i have small confusion, in Transfer Order page, i think its selecting the item from item table, so at that time whether it will check the Location also?

    pls guide me

  • LearnBC Profile Picture
    224 on at

    Still am confusing that is am doing correct or not....

    One issue is both of the Users and using Same Multiple User Groups .

    i want to only Restrict the transactions from Transfer Order page(they should transfer their own stock)

    there is no issues for seeing the data in any of the location, only need to restrict for transfer orders

    so in this case, how do i need to change the code

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans