Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

show only branch related to user registered in user setup problem but not show all branches

Posted on by 4,548

Hi guys i have problem in item list i have items from more three branches i want when user open item list see items of his branch example

Item No Branch

X                 A

XY              B

XYZ            C

XD              A

Suppose i user work in branch A and i want to see items of A only meaning as example X,XD and not show others can i do this in navision using FILTERGROUP. I WRITE THIS CODE IN OPEN FORM TRIGGER but until now not work IF UserSetup.GET(USERID) THEN BEGIN message(usersetup."user id"); Here check which user id is shown.

IF (UserSetup."Global Dimension 1 Code" <> '')

THEN

BEGIN

FILTERGROUP := 2;

SETRANGE("Global Dimension 1 Filter",UserSetup."Global Dimension 1 Code");

FILTERGROUP := 0;

END;

END;

and after this i add user in user setup table as name xx and assign globale dimension code 1 is jed when i make filter group and open item list with user i added in user setup table it give me first thing name xxx then open the form item list and show all branches why it show all branches it must show items following to jed only how i solve this problem

*This post is locked for comments

  • ahmed barbary Profile Picture
    ahmed barbary 4,548 on at
    RE: show only branch related to user registered in user setup problem but not show all branches

    thanks guys for help one million thanks

  • Rashed Profile Picture
    Rashed 3,765 on at
    RE: show only branch related to user registered in user setup problem but not show all branches

    change your code from

    SETRANGE("Global Dimension 1 Filter",UserSetup."Global Dimension 1 Code");

    to

    SETRANGE("Global Dimension 1 Code",UserSetup."Global Dimension 1 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans