Hi guys i have one question in item card i have items from more three branches i want when user open item card see items of his branch
example
itemno branch
X A
XY B
XYZ C
XD A
Suppose im user work in branch A and i want to see items of A only meaning as example X,XD and not show otheres can i do this in navision without using security filter .
when i open items i see all items i need every user see entries of his branch only
How i do that.
please any one help me if possible
thanks
You need to customize this
First you need to tag user for branch in user setup
Then you can filter it on Item Master.
First i added global dimension code 1 in user setup table and define table relation.and it read locations
after this i want to write code in item card in open form trigger can you told me what i write there if possible
Check Sales Order form OnOpenform trigger
you will get idea for Responsiblity Center
Now what i understand i create responsability center as jer select my branch code as A i want to show only and
this found in open trigger in sales order
IF UserMgt.GetLocation() <> ‘’ THEN BEGIN
FILTERGROUP(2);
SETRANGE(“Responsibility Center”,UserMgt.GetSalesFilter());
FILTERGROUP(0);
END;
can you tell me what modification i will make
Please try yourself and let us know what didnt work…
first i write code in item card open form trigger then
i write as following :
can you clear to me the idea
You forgot to paste what you have written [;)]
Which function i can take from code unit user setup management because i see parameter which found in get location function not have any information about user id.
thanks
You can simply get table and use field created by you
I make code like this
UserSetup.GET(‘User ID’);
//if UserSetup.GET(“User ID”) then begin
IF (UserSetup.“Global Dimension 1 Code” <> ‘’) THEN BEGIN
FILTERGROUP := 2;
SETRANGE(“Responsibility Center”,UserSetup.“Global Dimension 1 Code”);
// SETRANGE(“Responsibility Center”,UserMgt.GetSalesFilter());
FILTERGROUP := 0;
END;
but i face another error when i put code like this message error show to me "you have specified unknow variable “responsability center”
although i defined in new record this statement code
“Responsibility Center” := “Responsibility Center”.“Global Dimension 1 Code”;
it found as same lines and code in purchase order and sales order
why this proplem and how i solve if possible
please help me
thanks
“Responsibility Center” is a field in Sales Header table…
Its just an example, you cant use same code and fields/…
UserSetup.GET(‘User ID’);
//if UserSetup.GET(“User ID”) then begin
IF (UserSetup.“Global Dimension 1 Code” <> ‘’) THEN BEGIN
FILTERGROUP := 2;
SETRANGE(“Global Dimension 1 Filter”,UserSetup.“Global Dimension 1 Code”);
// SETRANGE(“Responsibility Center”,UserMgt.GetSalesFilter());
FILTERGROUP := 0;
END;
I open user setup table by admin user create user name ahmed in it and create field globale dimension code 1 then select A to user name ahmed as following ahmed A then write code you modified to me in open trigger in item card but when i open item card this message show use setup ‘user id’ does not exist although this name found in table user setup why this problem made and how i solve the problem thanks
it make to any user why
UserSetup.GET(‘User ID’);
What is ‘User ID’ in above code?
I want to told him when you get user id implement next section.
user id i use is primary key field of user setup table.
usersetup is record defined in global variable from table user setup 91.
But what value do you have in that User ID in Item card form?
user id is primary key of table user setup table
and i want to do when you see user id in table user setup and location filter it
may be the error in line get
why it give me this error
We know that User ID is primary key of User Setup table.
But what value do you have in it while getting user setup table?
I search in item card and item table i don’t found field name user id