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!
|
|
Getting groupsql in c#
Posted: 20 Apr 06 3:21 PM
|
fiogf49gjkf0d Hi there,
I am trying to get the groupsql in my C# application using the following code:
SalesLogix.SlxApplication slx = null; try { slx = new SalesLogix.SlxApplicationClass(); while (pluginreader.Read()) { string pluginid = pluginreader.GetValue(pluginreader.GetOrdinal("pluginid")).ToString(); MessageBox.Show(pluginid); string groupSql = slx.BasicFunctions.GetGroupSQL(pluginid);
MessageBox.Show(groupSql);
} }
I first get the correct pluginid, but when provided to the getgroupsql, it doesn't give me the sql.
The same thing works fine in saleslogix
anyone having a clue on what to do?
UPDATE: If I log on with the administrator account, I am able to see the output from the groupsql! Any idea why I can't see the output when using a normal user. I have tried with the "all account" group. The funny thing is that in slx I will get the output from the groupsql if, despite what user I am logged in as.
regards Christian |
|
|
|
Re: Getting groupsql in c#
Posted: 21 Apr 06 7:45 PM
|
fiogf49gjkf0d I don't use GetGroupSQL from VBScript plugins so I don't know what behavior you see there, but from my C# apps I know that I can only get the group SQL if I pass the ID for the main group plugin record. That is, the record where the BASEDON IS NULL. AFAIK, the other rows for the group are the releases for the group whose PLUGINID shows in the BASEDON field, but the group itself is only defined in the main record (where BASEDON IS NULL).
If your group record has a BASEDON value (not null), then pass that to GetGroupSQL instead of the PLUGINID. Know what I mean? |
|
|
|
Re: Getting groupsql in c#
Posted: 24 Apr 06 1:05 PM
|
fiogf49gjkf0d Actually you are right Ryan. The GroupSQL is only stored in the base customization (one made by Admin). I don't believe the GroupSQL is stored in each released ID, which is eventually what you're getting if you're looking at this from the client perspective. This keeps the BLOB size to a minimum since you're not copying the EXACT SAME DATA into 2 different places. Admin uses the UNRELEASED version, which is exactly why it was seeing the data but no users could. I don't think this is the only plugin type to do this either, as I believe Word Templates and a few others probably follow a similar pattern with their BLOB data. |
|
|
|
Re: Getting groupsql in c#
Posted: 04 May 06 1:53 AM
|
fiogf49gjkf0d I dont follow this logic. The end user only has access to the plugin records released to them. Logically, this means the definition of the plugin (or the GroupSQL in this case) must be in the released record as well. Take remote users for example: the original plugins do not sync to them and only the released versions do. If the released versions do not have the plugin definition (all the info in the data column) then SalesLogix would not function for remotes.
Timmus |
|
|
|
Re: Getting groupsql in c#
Posted: 04 May 06 1:55 PM
|
fiogf49gjkf0d Yeah, I don't see the logic either, but that's the only way it works You'll only get a result returned if you pass the base pluginid to the function. Passing the released pluginid values won't return anything. |
|
|
|
Re: Getting groupsql in c#
Posted: 05 May 06 10:31 AM
|
where can i get an abortion pill for free where can i get an abortion pill fiogf49gjkf0d You are correct Timmus in that the BLOB stores the entire group for BOTH plugins. If I made it to sound like they don't, I'm sorry I would have been mistaken. Using the base pluginid doesn't quite sound like "functioning as designed" to me but there's obviously some actual reason none of us are quite privy to. Perhaps the provider doesn't like us cheating on the base plugin with it's younger-but-legal, released sister. |
|
|
|