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!
|
|
AccountSummary Table Usage
Posted: 29 Feb 08 9:35 AM
|
In a custom table grid on a tab, I tried to relate the AccountSummary table to my custom table via a left join based on AccountID. 'Did it to display the Account name. And it works correctly when the Admin is the logged on user. But it does NOT work when a normal user is the logged on user. Why?
|
|
|
| |
|
Re: AccountSummary Table Usage
Posted: 06 Mar 08 8:43 AM
|
Thanks for your interest. What I've been able to determine is that the Data Grid control changes the SQL being issued for execution when the user is NOT the Admin. I ran the Profiler under both conditions (Admin vs normal user) and found the following code generated only for the normal user: FROM PURSUIT_OPP A1 LEFT OUTER JOIN ACCOUNTSUMMARY_ A3 ON (A1.EPCACCOUNTID=A3.ACCOUNTID) AND A3.ACCESSID_='U6UJ9A000009'
The reference to 'ACCESSID' does not appear when the Admin is the user. The question remains: Why ?
I think that a work-around can be constructed by first generating a separate record set via a normal SQL Select, and then binding that record set to the grid as its record set. Anyway, I'll try it, but I'd really like to know why the Data Grid control is set to function in this manner.
Thanks, Bob
|
|
|
|
Re: AccountSummary Table Usage
Posted: 06 Mar 08 8:46 PM
|
Anytime you go after a table with SECCODEID in it SLX OLE DB Provider appends the Accessid to it.......your users don't have access to that record. |
|
|
|
Re: AccountSummary Table Usage
Posted: 06 Mar 08 8:46 PM
|
Anytime you go after a table with SECCODEID in it SLX OLE DB Provider appends the Accessid to it.......your users don't have access to that record. |
|
|
|
Re: AccountSummary Table Usage
Posted: 07 Mar 08 6:40 AM
|
Originally posted by Robert Levine
...
The reference to 'ACCESSID' does not appear when the Admin is the user. The question remains: Why ? .. Thanks, Bob
|
|
It is hard coded into the SalesLogix executable(s)SalesLogix/Provider to ignore ALL Security when the userid ADMIN shows up... Nothing short of hand coding (typically on AXFormChange) will stop Admin's full access.
This is why we tell our clients.. the Admin user is not to be used a regular user. It's just for administering SalesLogix. -- RJLedger - rjlSystems |
|
|
|
Re: AccountSummary Table Usage
Posted: 07 Mar 08 8:52 AM
|
Foregive me but I just couldn't help but play around with this one some more. And I found out a few things thanks to the use of the Profiler. The concept is to allow remote users to see the account name along with other info even when they haven't yet subscribed to the account. All accounts are owned by "Everyone". Since a remote user can access the account name (from AccountSummary) in order to subscribe to it, I figured my grid should be able to do the same since the full AccountSummary Table is on all remote databases.
Everything I tried drew blanks and I could see the altered code in the Profiler. It looked like every reference that drilled down to the AccountSummary ran into the SeccodeID barrier. So I decided to NOT drill down to that table. Instead of basing my tab's grid on my custom table, I based it on the AccountSummary itself. Then I related the AccountSummary Table to my custom table to get to the ID field I needed to bind the grid to the 'BindID'. And instead of using a Left Join, I tried a straight Inner Join. And guess what,...IT WORKED. I'm not totally sure of why this arrangement works, and I'd like to know why it does. Here's the executed SQL that was generated:
SELECT A1.ACCOUNTID, A2.OPPORTUNITYID A2_OPPORTUNITYID, A2.ISFORECASTED A2_ISFORECASTED, A1.ACCOUNT, A2.DESCRIPTION A2_DESCRIPTION, A3.USERNAME A3_USERNAME, A3.PHONE A3_PHONE, A2.PROBABILITYPCT A2_PROBABILITYPCT, A2.TOTAL A2_TOTAL, A2.WTOTAL A2_WTOTAL, A4.OWNER A4_OWNER FROM ACCOUNTSUMMARY A1 INNER JOIN PURSUIT_OPP A2 ON (A1.ACCOUNTID=A2.EPCACCOUNTID) LEFT OUTER JOIN PURSUIT A4 ON (A2.PURSUITID=A4.PURSUITID) LEFT OUTER JOIN USERINFO A3 ON (A2.CSEUSERID=A3.USERID) WHERE A2.PURSUITID = [DBTYPE_STR | DBTYPE_BYREF,"Q6UJ9A0003PZ"] '----------------------------------------------------------------------------------------------
This has been a fun problem, sort of like playing with a 'black box' otherwise known as the SLX OLE-DB Provider. And I wonder if different versions will react in the same manner. This was done using Slx 7.2.1.
|
|
|
|
Re: AccountSummary Table Usage
Posted: 07 Mar 08 10:52 AM
|
I noticed something else: When the AccountSummary Table is the subject of a join, the Provider switches to the use of the AccountSummary View (ie: ACCESSID_ in ACCOUNTSUMMARY_). When using the AccountSummary Table directly, the Provider uses the table directly. Perhaps the security logic differs for the view. Any thoughts? |
|
|
|