show only item following one branch by filtergroup how

ahmedbaahmedba Member Posts: 424
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

Comments

Sign In or Register to comment.