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: SITECODE Query
Dave Cleary
Posts: 61
 
SITECODE QueryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Aug 14 9:53 AM

Hi


Can anyone tell me how a sitecode is generated?


Am I able to autogenerate a sitecode using sitekeys or something similar like you can with accountid etc.


What would be the impact of a user not having a sitecode?


Any advice on this would be appreciated


Thanks in advance


Dave

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: SITECODE QueryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 14 3:37 AM

You can't not have a sitecode. What are you trying to achieve ?

[Reply][Quote]
Dave Cleary
Posts: 61
 
Re: SITECODE QueryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 14 4:22 AM

Hi Mike


I've just been looking at potentially automating a new user insert which would be triggered from entering a user on to another system we have. So in a nutshell the new user is entered on the other system and then triggers a stored procedure to insert the new user in to saleslogix.


I have SQL profiled the new user insert in SalesLogix and have been quite surprised as to how many inserts it does as there are a number of tables it looks at. However I have created a lengthy script that inserts the data in to the relevant tables which can then be accessible from the Administrator and have managed to set all the pemissions etc. inserting in to the USEROPTIONS, USERSECFUNCTIONS and USERFEATURESECURITY tables. I have achieved this by autogenerating the appropriate sitekeys which seems to have covered most IDs but not the SITECODE key which is required.


I'm obviously doing this in our test system but was just curious to see if I could achieve a user insert through a stored procedure passing parameters from another system. As I said I have it working to the extent that it creats a user in the Administrator that can be accessed without error and has the appropriate security settings but the sitecode key is blank as I cannot find a way to autogenerate it. Knowing what I know now I imagine the likelihood of me achieving this is pretty remote but I just have this notion that I should be able to achieve an auto insert regardless of how complex it may turn out to be. Can I autogenerate a sitecode key?


What does the sitecode key do? Is it only used for remote users and syncing? both of which we don't have or use.


Thanks


Dave

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: SITECODE QueryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 14 5:11 AM

Hi Dave


Ah right, in which case, if you don't use Sync then the sitecode is fairly irrelevant - but you should set it anyway for the future etc. The sitecode is used for remotes and is a unique code (and is used to seed the SiteKeys table should you be using sync). However, as you don't use Sync then the SiteKeys table will all have the same PrimaryID (most likely 6UJ9!) and all subsequent keys (for acc/con/opp etc) will stem from there, rather than a new set created with the SiteCode of the user themselves (if they were remote).


So, I would use the last four chars of the UserID - as this has to be unique in any event (granted, not if you had more than 1,679,615 users )


 


Regards, Mike


 

[Reply][Quote]
Dave Cleary
Posts: 61
 
Re: SITECODE QueryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 14 4:11 AM

Hi Mike


Thanks for the reply it worked exactly as you suggested which was great help, however i've given up on this now and have conceded that it can't be achieved as the user is created okay and you can access the user admin record but t here is no detail view available on the security tab as there is nothing in the drop down list. I have inserted/updated the relevant usersecurity row and the usersecfunctions and userfeaturesecurity rows that was profiled from a user insert but the detail view is empty where on a normal user there are several options. As a result this renders the account unuseable.


I don't suppose you have any last suggestions as to how this detail view is generated?


Thanks


Dave


 

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: SITECODE QueryYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 14 4:15 AM

Did you create the BLOB data columns ? I was wondering about that (and how you did it) - but suspect you've not copied that.


select security from usersecurity


You'll note this is a BLOB. In here is all the stuff that's missing!


 

[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 5:10:54 AM