Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, February 21, 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: R/W Access to control only for specific users
Konstantin Vishnevsky
Posts: 97
 
R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Sep 07 2:51 PM
We have several checkboxes that only certain users are allowed to "touch". All others see them as R/O.
They way I do it is create a custom Security Profile with R/W to the field that corresponds to the checkbox.
But it is somewhat inconvenient, since we are adding more controls like this and each one has different users assigned to it. That means I have to create a separate Security Profile for each and then maintain them, making sure any general changes are applies to all profiles.
Is there any easier way to give access to certain controls ONLY to specified users?
Will that have to be in code using user's DB ID?

Thanks
[Reply][Quote]
Jason Buss
Posts: 382
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Sep 07 9:16 AM
Other than using security profiles, the only way I know of to do that would be to define which controls are writable via code as you mention. Although, I think the only real benefit of doing it in code is that you would be able to define everything in one script, rather than deal will numerous security profiles. If access is different for each individual user, your case statement could get pretty unwieldy based on how many individual users you have to set up.

For example: (On whenchange event of the form)

chkBoxA.Enabled = False
chkBoxB.Enabled = False
chkBoxC.Enabled = False

Select Case Application.Basicfunctions.CurrentUserID

Case "xxxxxxxxxxx1"
chkBoxA.Enabled = "True"
Case "xxxxxxxxxxx2"
chkBoxB.Enabled = "True"
Case "xxxxxxxxxxx3"
chkBoxC.Enabled = "True"
etc...

End Select

If you can break it up by teams, it would be a little more manageable. (team1 has access to checkboxes 1, 2, 3; team 2 has access to checkboxes 4, 5, 6, for example...) You would have to write a function to determine if a user is a member of a particular team, but that's not to difficult.

You could do somthing like: (Assuming you write a function called IsTeamMember which you pass the current UserID along with the Team name, which would return either True or False)

Dim sUserID

sUserID = Application.BasicFunctions.CurrentUserID

If IsTeamMember(sUserID, "TeamName1") Then
chkBoxA.Enabled = True
chkBoxB.Enabled = True
End If

If IsTeamMember(sUserID, "TeamName2") Then
chkBoxC.Enabled = True
chkBoxD.Enabled = True
End If

etc...

Not sure if this helps. Hopefully, it will give you some ideas at least.
[Reply][Quote]
Frank Chaffin
Posts: 475
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Sep 07 9:47 AM
I have used the team approach several times in situations like this. It works well.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Sep 07 11:11 AM
Quote:
Originally posted by Jason Buss

...You would have to write a function to determine if a user is a member of a particular team, but that's not to difficult...


I have a function to do just that posted here: http://saleslogixblog.com/rfarley/archive/2003/11/19/227.aspx

-Ryan
[Reply][Quote]
Jason Buss
Posts: 382
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Sep 07 4:31 PM
So fancy, throwing in the group type as a parameter...
[Reply][Quote]
Konstantin Vishnevsky
Posts: 97
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Sep 07 2:37 PM
Thank you Ryan and Jason

It works perfectly now and much more convenient than the approach I used before.
[Reply][Quote]
Dan Delisle
Posts: 38
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 14 11:42 AM

Hi Ryan,


 


Do you still have that function available somewhere? I tried going to the link but it appears to no longer be pointing to anything.


 


thank you sir

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 14 11:51 AM

Quote:
Originally posted by Dan Delisle
Do you still have that function available somewhere? I tried going to the link but it appears to no longer be pointing to anything.


Hi Dan,


The blog post mentioned above still exists, it' sjust an old post from before I moved my blog to the customerfx.com website. The new correct link is here: http://customerfx.com/pages/crmdeveloper/2003/11/19/39084.aspx


BTW, that version is for VBScript/LAN. There's a version for SLX Web here: http://customerfx.com/pages/crmdeveloper/2009/02/04/determining-if-a-user-is-a-member-of-a-team-in-saleslogix-web.aspx

[Reply][Quote]
Dan Delisle
Posts: 38
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 14 12:10 PM

thank you very much Ryan. I dont like to speak about it publicly but we are on 7.5.0.1 LAN This will be perfect!

[Reply][Quote]
Dan Delisle
Posts: 38
 
Re: R/W Access to control only for specific usersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Jul 14 4:56 PM

holy cow Ryan, that is one of the easiest and most powerful things I have yet to do in SLX. It worked like a champ!!!! thank you to you and all the other folks on here who share their knowledge.

[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): 2/21/2025 7:13:13 AM