Hi, Load the macro #Admin
Implement this Method in the class Global static boolean IsUserInGroup (UserGroupId _GroupId = '', UserId _userId = CurUserId()) { #Admin UserGroupList info; ; if (!prmisdefault(_groupId)) _groupId = #AdminUserGroup; return (select recid from UserGroupList where UserGroupList.userId == _userId && UserGroupList.groupId == _GroupId).recid !=0; } You can now use the function isUserIngroup to determine if a user is in a given group. The function returns true if the user is in the group otherwise false. Mit freundlichen Grüßen / Best regards / Med venlig hilsen Jesper Jørgensen / Abt. NMT-XD Senior Product Manager arvato systems | Technologies GmbH An der Autobahn 18 33311 Gütersloh jesper.joergen...@bertelsmann.de<blocked::blocked::blocked::mailto:jesper.joergen...@bertelsmann.de> Phone: +49 5242 / 40 80 54 Fax: +49 5242 / 40 80 40 Mobile: +49 172 / 571 03 34 http://www.as-T.de<blocked::blocked::http://www.as-t.biz/> arvato systems | Technologies GmbH Joachim-Jungius-Str. 9, 18059 Rostock Geschäftsführung: Erwin Pietz, Matthias Moeller Amtsgericht Rostock - HRB 7497 ________________________________ "Der Inhalt dieser Nachricht oder eventueller Anlagen ist vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Bitte stellen Sie sicher, dass die Information in dieser Nachricht ausschließlich an die adressierten Personen gelangt. Sollte diese Nachricht versehentlich an Sie gesendet worden sein, dann informieren Sie bitte umgehend den Absender und löschen Sie die Nachricht. Vielen Dank." "The information in this e-mail and any attachments is confidential. The information must only be held in areas that have controlled and limited access to the addressed persons. If this e-mail has been sent to you in error, please immediately notify the sender and delete the e-mail. Thanks." ________________________________ Von: development-axapta@yahoogroups.com [mailto:development-axa...@yahoogroups.com] Im Auftrag von branjema Gesendet: Donnerstag, 17. September 2009 19:48 An: development-axapta@yahoogroups.com Betreff: [development-axapta] Hide Button Based on User Permissions I want to make button visible to users if a salesorder is not confirmed. I have done this. But now I want to make the button visible to admins all the time. What's the best way to do this? Thanks in advance [Non-text portions of this message have been removed]