Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, July 6, 2025 
 
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!
 Architect Forums - SalesLogix Scripting & Customization
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.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Enabling or disabling a checkbox
Dave Cleary
Posts: 61
 
Enabling or disabling a checkboxYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Adam Travers
Posts: 113
 
Re: Enabling or disabling a checkboxYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Dave Cleary
Posts: 61
 
Re: Enabling or disabling a checkboxYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Sep 10 8:21 AM
Thanks Adam that has worked a treat
[Reply][Quote]
Leon Gort
Posts: 127
 
Re: Enabling or disabling a checkboxYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/6/2025 6:50:33 AM