3/20/2026 7:26:25 PM
|
| |
| slxdeveloper.com Community Forums |
|
| |
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Enabling or disabling a checkbox
Posted: 16 Sep 10 5:48 AM
|
Hello
I'm trying to enable and disable checkbox depending on which user logs in. I basically want one user to log in and to use the checkbox and the other to log in and only see the checkbox as read only.
I thought the easiest way to do this is by using something like:
Dim strIsAdminTeam strIsAdminTeam = CheckForNull(GetField("username","userinfo","userid = '" & Application.BasicFunctions.CurrentUserID & "'")) If strIsAdminTeam = "Admin Team" Then AdminChkBox.Enabled = True Else AdminChkBox.Enabled = False End If
Now If I do this using AdminChkBox.Visible in the above code it works and the CheckBox is only visible if you are part of the Admin Team, however using the Enabled status it doesn't work.
Has anyone any ideas how I can achieve or overcome this?
Thanks
Dave |
|
|
|
Re: Enabling or disabling a checkbox
Posted: 16 Sep 10 7:20 AM
|
Hi,
I have a similar routine of the Account Detail view which works fine (it might not be the best way to do it, but it works!)
My script is as follows:
Sub CheckAdmin
chkAdmin.Enabled = False
Select Case Application.BasicFunctions.CurrentUserID Case "U6UJ9A00002S" chkAdmin.Enabled = True Case "U6UJ9A00003D" chkAdmin.Enabled = True Case "ADMIN " chkAdmin.Enabled = True End Select
End Sub
I then call the CheckAdmin script from within the AXFormChange rountine. |
|
|
| |
|
Re: Enabling or disabling a checkbox
Posted: 19 Sep 10 6:36 PM
|
If you haven't already, I'd create a table to store the users that have access to the check box that you can manage within the SLX client (manage view) - otherwise you will have to modify your code when users change.
You just need to check if the user is in the table then and enable the check box.
Cheers, Leon |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|