11/16/2024 12:57:32 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 using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
|
|
|
|
Changing Department Field on UserInfo table by SQL
Posted: 05 Jan 07 8:36 AM
|
fiogf49gjkf0d Hi All,
Firstly Happy New Year to All,
I written a stored Proc, to update, and keep updated, UserInfo & staff Contact/Address records, based upon our HR DB data, all is fine except the department field.
The SQL updates the field OK, and it displays OK in SQL, but within Administrator the field is not updated?
If I change the value in Administrator, the Department filed on the UserInfo Table gets updated?
Help please?? I have looked in other tables, but cannot find where the data is going.
We run reports at department level, with this discrepancy between data displayed in Administrator & what is in the SQL table, which one would take preference?
Regards
Darren
We are on SLX Ver 6.3 - Web Client |
|
|
|
Re: Changing Department Field on UserInfo table by SQL
Posted: 05 Jan 07 4:59 PM
|
fiogf49gjkf0d SecCode is where you will find department info. Then reference SecRights to determine membership. Here is a sql statement that will list all users and the departments they are in:
SELECT U.UserName, S.SecCodeDesc, SP.ProfileDescription FROM UserInfo U INNER JOIN SecRights SR ON SR.AccessID = U.UserID INNER JOIN SecProfile SP ON SP.ProfileID = SR.ProfileID INNER JOIN SecCode S ON S.SecCodeID = SR.SecCodeID WHERE S.SecCodeType = 'D'
The profile info is of little value when dealing with departments. I included it as you do care about the profile if you were researching team membership for example.
Hope this helps,
Timmus
|
|
|
| |
|
Re: Changing Department Field on UserInfo table by SQL
Posted: 06 Jan 07 4:46 AM
|
fiogf49gjkf0d Hi Darren,
How's it going? If your reports use just the text of the department field they should be fine even though in administrator they don't show up. In order for your routine to work completely pefectly is quite complex - you would have to get the seccodeid from the seccode table for that department, and create a secrights record for that user against that seccodeid. You can check these tables for the format they should have. You will also have to remove the secrights records for the department you are taking away for the user. Oh, and that assumes the new department already exists in Saleslogix! Make sense?? Cheers, Nick |
|
|
| |
|
Re: Changing Department Field on UserInfo table by SQL
Posted: 08 Jan 07 11:15 AM
|
fiogf49gjkf0d Darren,
Please note that if you have written code that updates the userinfo.department column and you are not correctly managing the secrights and seccode records, you are "breaking the rules". If you need to use a simple text field for reporting I suggest using one of the Custom fields (Custom tab in the User Profile). If you opt to do so, you can find the data in the UserProfile table.
Timmus |
|
|
|
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!
|
|
|
|
|
|
|
|