Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
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!
 Web Forums - ASP/ASP.NET/Web Services/Other
Forum to discuss building external web applications for SalesLogix. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to ASP/ASP.NET/Web Services/Other | New ThreadView:  Search:  
 Author  Thread: Something that might prove cool and/or useful
Jeff Ballard
Posts: 326
 
Something that might prove cool and/or usefulYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Jeff Ballard
Posts: 326
 
Re: Something that might prove cool and/or usefulYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Something that might prove cool and/or usefulYour last visit to this thread was on 1/1/1970 12:00:00 AM
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
[Reply][Quote]
David Nunnally
Posts: 206
 
Re: Something that might prove cool and/or usefulYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 25 Apr 07 9:05 AM
fiogf49gjkf0d
WOW! Way cool!

I could play with this all day. I already have several places I can use this!

Thanks Jeff - uthaman!
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 3:20:08 AM