Visible/Non visible dynamic dans Menuitems

Urgent!! Comment puis-je gérer dynamiquement (en fonction des droits) la notion de visibe/non visible pour chaque entrée MenuButton d’un Menuitem. Merci pour votre aide.

See the properties of the menu item : give it a name. then on open form you could write something : IF USERID = ‘myname’ THEN CurrForm.“myControlName”.VISIBLE = FALSE;

cool, je n’y avai pas pensé comme ça. Merci.

quote:


Originally posted by zhiroo
cool, je n’y avai pas pensé comme ça. Merci.


think about the maintenance will you ? eg if new users are added and that stuff …

Au lieu de teste le USERID, il vaut mieux tester si l’utilisateur appartien à un groupe prédéfini, en cas d’ajout d’utilisateur, tu le rajoutes simplement dans le groupe, sans devoir changer la prog ex : rec_memb record “Member Of” rec_memb.SETRANGE(“User ID”,USERID); rec_memb.SETRANGE(“Role ID”,‘Nomdugroupe’); IF NOT rec_memb.FIND(’-’) THEN CurrForm.“myControlName”.VISIBLE = FALSE;

  1. Local versions - French means that the topics are related to localizations of the french version of navision, not that you should use this forum for posting everything on French. 2) This post is about a generic matter that could probably interest other users. 3)Check the table user setup. On that table you can add a field let’s say “hide print button”. Call your button in this example PrintButton (change the name property to be printbutton in this example). Form onActivate var myusersetup record user setup OnActivate CurrForm.PrintButton.VISIBLE(TRUE); CLEAR (myUserSetup); myUserSetup.RESET; IF (myUserSetup.GET(USERID)) THEN IF (myUserSetup.“hide print button”) THEN CurrForm.PrintButton.VISIBLE(FALSE); A bientot,