3/15/2026 5:22:25 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 writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Script error for all users except ADMIN in SLX v7.2.1
Posted: 18 Aug 09 11:55 AM
|
Hi all.
I have the following script:
strSQL2 = "SELECT s.SALES_STAGE AS STAGE_PROSPECT, SUM(CASE WHEN r.USERFIELD10 IS NULL THEN 0 ELSE 1 END) AS SCOUNT_PROSPECT" strSQL2 = strSQL2 & " FROM sysdba.C_ACCOUNT_LEAD_SOURCE t RIGHT OUTER JOIN sysdba.ACCOUNT r ON t.ACCOUNTID = r.ACCOUNTID RIGHT OUTER JOIN sysdba.C_PM_SALES_STAGES s ON ISNULL(r.USERFIELD10, 0) = s.SALES_STAGE AND ISNULL(r.USERFIELD3, 0) = s.ZONE_NUMBER AND r.SUBTYPE = 'Vendor'" strSQL2 = strSQL2 & " WHERE (s.SALES_STAGE = 'Prospect') and (t.ACCOUNTID IS NULL)" strSQL2 = strSQL2 & " GROUP BY s.SALES_STAGE, t.ACCOUNTID"
When I'm signed in as ADMIN, it does not give me an error. But when I sign in as any other user I get a Failed to Parse SQL
What is wrong with this script that works with the ADMIN but nobody else?
Thank you in advance!
|
|
|
| |
|
Re: Script error for all users except ADMIN in SLX v7.2.1
Posted: 19 Aug 09 6:21 AM
|
You have to keep in mind that when anyone other than ADMIN is running an SQL Statement, SLX will parse it and add the Security Joins. I would suggest you rewrite the statement. Instead of Using Right Joins to get back ot the Account, why don't you base the query on the Account table instead.
You can simplify your query and then work in tandem with the SLX Profiler so that you can capture how SLX is parsing your queries. It may help you build the query in a way that is more friendly with the Parser. |
|
|
| |
|
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!
|
|
|
|
|
|
|
|