help with Salespers./Purch. Code

Dear all,

Now I need check the Salespers./Purch. Code from UserID

Every userid are already have unique Salespers./Purch. Code, so now , I need check the Salespers./Purch. Code from their Userid for loading data on Report, please give me the advises for this problem…

Thanks all

The User Setup table has a field to specify their salesperson code.

In which table you have?

Your report is based on which table?


In table User Setup already have field Salespers./Purch. Code , but I don’t know how get Salespers./Purch. Code from Userid that are logining…

Where do you need this?

report? or after logging in?

Can be more clear please.

thanks for your reply,

this is my situalation :

  • All of Sales Report must be auto filter by Salespers./Purch.Code, by Team Code…

Every sales man just can view Sales Report by own …but the Leader can be view all of report of his team’s member.

Please advices…

Thanks many.

you should try something like


“Sales Header”.SETRANGE(“Salesperson Code”,UserSetup.“Salespers./Purch. Code”);

How do you differentiate salesperson and Leader?

Between sales person and Leader will be identify by roles access… but still not make sure…anyway I will try your code first…

Thanks much.