11/26/2024 5:25:45 AM
|
|
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 building external web applications for SalesLogix. View the code of conduct for posting guidelines.
|
|
|
|
Something that might prove cool and/or useful
Posted: 24 Apr 07 4:46 PM
|
fiogf49gjkf0d While the following is unsupported, it might come in handy for someone at some point.
I wanted to be able to get group information into an ASP.NET page without having the SalesLogix client installed. I figured there had to be a way, and there is.
The web client includes a COM DLL and it's .NET wrapper called "GroupTranslator.DLL" and "Interop.GroupTranslator.DLL" into the "web components\ASPScripts\bin" directory. Copy these to a folder or just add a reference to them wherever they are in your .NET project. Of course, make sure the "GroupTranslator.DLL" is registered.
Next, in your C# project, put a "using GroupTranslator;" statement.
You can then do something like this:
GroupTranslatorClass groupt = new GroupTranslatorClass();
string test = groupt.GetGroup(pluginid, connectionString);
and run it. When you're done, test will contain an XML string with all the columns in the group, their display properties, etc. Most useful, though, is the < selectsql >, < fromsql > and < wheresql > nodes, which have exactly what you'd expect. I'm testing stuff like this because I may have a need to access group info outside of SalesLogix.
The only SLX component required to be installed is the OLEDB provider. Which, BTW, works (at least for my testing purposes) on Vista. Obviously, I'm not using the client.
BTW, I'm doing this on 6.2.6 and cannot confirm whether it would work on 7.x. Presumably, given the re-write for the web in 7.2, it won't, although the legacy components might support it.
Jeff
|
|
|
|
Re: Something that might prove cool and/or useful
Posted: 24 Apr 07 6:20 PM
|
fiogf49gjkf0d To add to my previous post:
The function in the DLL "GetGroup" returns the XML definition as I mentioned above. The function GetGroupByName expects two parameters as well, group name and conn string. If you just pass in the name of the group, such as "MyLatest", it will fail. You must pass in the family name followed by a colon and then the group name. So
string result = GetGroupByName("CONTACT:MyLatest", "connectionString");
will work. If you leave out the "CONTACT:" on the first param it fails.
Also, "GetQualifiedGroup" will return the same thing as GetGroup except it doesn't use the table aliases. Instead, it puts the table name. So, where GetGroup might return "A2.FIRSTNAME", GetQualifiedGroup will return "CONTACT.FIRSTNAME".
The function ViewSQL will return just the SQL statement if you pass in the XML string returned by GetGroup. Although I'm guessing if you build the XML string, you probably already have the SQL.
Jeff
|
|
|
|
Re: Something that might prove cool and/or useful
Posted: 24 Apr 07 11:54 PM
|
fiogf49gjkf0d Good stuff, Jeff. Since this has all been done in .Net we are likley going to build a custom query builder in ASP.net. The reason is simple: (I am biting my tongue to the point of bleeding) the Sage provided ASP.net query builder is far from usable.
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!
|
|
|
|
|
|
|
|