FILTERGROUP Sales Order by Location

vnprocvnproc VietNamMember Posts: 41
edited 2021-07-24 in NAV Three Tier
I'm having a filter problem on the Sales Order list and the Employee warehouse table.
I want to set filters the Location codes on the Sales Order (sales header) according to the location codes of the user when opening the Sales Order List page.
(The Sales Order list only shows the location codes by the warehouse employee table.)

I write code but not working. Not sure what else is needed? Hope everyone can help,
thank you very much.
OnOpenPage()

IF "Location Code" <>'' THEN BEGIN
FILTERGROUP(2);
IF WarehouseEmployee.GET(USERID) THEN 
LocationEmployee:= WarehouseEmployee."Location Code";
SETRANGE("Location Code",LocationEmployee);
//SETRANGE("Location Filter",LocationEmployee); 
FILTERGROUP(0);

END;

Answers

Sign In or Register to comment.