Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, October 10, 2024 
 
View User Profile  

 User Profile - Ryan Farley  
  Ryan Farley
(SalesLogix Business Partner)
Customer FX Corporation

fiogf49gjkf0d

Ryan Farley is the Director of Development for Customer FX and creator of slxdeveloper.com. He's been blogging regularly about SalesLogix since 2001 and believes in sharing with the community. He loves C#, Javascript, Python, web development, open source, and Linux. He also loves his hobby as an amateur filmmaker.

View Ryan's SalesLogix Mobile Seveloper Series
View Ryan's SalesLogix SData Developer Series
View Ryan's Git for the SalesLogix Developer series



Log in to send this member a message!
 


 Ryan Farley's Contributions
Ryan Farley has contributed 200 comments and 60 articles.
 
Select to view:    
Comment: Re: Generating Table IDs in T-SQL - Version 2
fiogf49gjkf0d

Patrick,


If you don't have remote users that synchronize, you can use the stored procedure I provided here http://customerfx.com/pages/crmdeveloper/2013/12/23/sql-stored-procedure-to-create-saleslogix-table-id-values.aspx


This will allow you to create SLX table ID values from direct SQL and can be used where ever you want.


Ryan



Author: Ryan Farley - 12/24/2013

 
Comment: Re: Generating Table IDs in T-SQL
fiogf49gjkf0d

Jason's follow-up article to this one is posted here http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=107



Author: Ryan Farley - 11/14/2011

 
Comment: Re: Generating Table IDs in T-SQL
fiogf49gjkf0d

Sarbello,


The SLX procedures are not database procedures. Instead they are implemented only in the SLX OLEDB Provider. To use the SalesLogix function slx_dbids to create table ID values (which the functions outlined in this article use) the SalesLogix OLEDB Provider must be installed and a valid SLX connection string must be used. Although the functions in this article exist in SQL, they are merely calling the slx_dbids function wil is internal to the SLX OLEDB Provider.


Ryan



Author: Ryan Farley - 11/5/2011

 
Comment: Re: QuickXporter - Quick Data Export Utility
fiogf49gjkf0d

Hi Adam,


 


I do not and don't plan on making one since it would require a full rewrite as all of this code was based on BDE (for SLX versions prior to v6). Sorry Frown


Ryan



Author: Ryan Farley - 8/18/2011

 
Comment: Re: QuickXporter - Quick Data Export Utility
fiogf49gjkf0d

Hi Gregory,


This utility was built long ago for a version of SalesLogix that worked quite differently than recent versions. It will only work with versions previous to SLX version 6 (basically from v1 to v5).



Author: Ryan Farley - 6/29/2011

 
Comment: Re: Integrated Logins with the SalesLogix 6.2 Provider
fiogf49gjkf0d

Hi Paty,


The point of integrated security is that you don't need the user's login name and password. There's no way to get it from the connection since you're not providing it to the connection. Make sense?


-Ryan



Author: Ryan Farley - 4/28/2011

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d

Guy,


The ShowViewForRecord method doesn't have any ties to a grid at all, so it shouldn't/won't matter what table the grid is bound to since ShowViewForRecord doesn't have anything to do with the grid, or even know about it. It all depends on what the base table of the data bound form is and what table value you pass to ShowViewForRecord.


Does that make sense?



Author: Ryan Farley - 2/24/2011

 
Comment: Re: Generating Table IDs in T-SQL
fiogf49gjkf0d
What a completely awesome article. Thanks.

Author: Ryan Farley - 4/22/2010

 
Comment: Re: .NET SlgxApi.dll Managed Wrapper
fiogf49gjkf0d
Ravi,

To read/write to the SLX database use the SLX OLEDB Provider. This is installed with SLX or can be installed separately from the SLX installation CD.

The SlgxApi.dll was meant for older SLX versions (v5 and prior).

Author: Ryan Farley - 3/31/2010

 
Comment: Re: Creating SalesLogix Table ID Values - The Definitive Guide
fiogf49gjkf0d
Ravi,

The SLX OLEDB Provider is installed with SalesLogix. You can install it separately from the SLX installation CD.

-Ryan

Author: Ryan Farley - 3/31/2010

 
Comment: Re: SalesLogix Web Services Toolkit
fiogf49gjkf0d
Karan,

The SLXNetwork.1 provider (as mentioned in this doc) is for earlier versions of SLX. Current versions of SLX will have the provider named SLXOLEDB.1 as you have found already.

As for the tables needed for inserting a lead record, those sound right, but I usually run a profiler and insert it via the client to know for sure.

-Ryan

Author: Ryan Farley - 3/12/2010

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
LABORDE,

Do not use DoInvoke to invoke the lookup, instead use LookupItemWithConditionByID. Take a look at the following article http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=75

-Ryan

Author: Ryan Farley - 2/18/2010

 
Comment: Re: How To Update Controls Across Forms
fiogf49gjkf0d
Chris,

Yes. The Form has a "Script" object that gives you access to these.

Dim frm

Set frm = Application.Forms("System:My Form")
frm.Script.RefreshGrids()

Make sense?

Author: Ryan Farley - 2/3/2010

 
Comment: Re: E1 User Groups
fiogf49gjkf0d
Hi Jose,

I am currently working on on for the web client. It will be open source on http://github.com/customerfx when it is ready. I don't plan on making a LAN version, but once I have the code on github I would love contributions to make it work with LAN client as well (so we'd have a common set of tools and table structure for both LAN & web).

-Ryan

Author: Ryan Farley - 1/23/2010

 
Comment: Re: The SalesLogix URL Link
fiogf49gjkf0d
rxp6745,

You'll need to format the e-mail as HTML so you can add the link as a hyperlink using standard HTML anchor tags.

-Ryan

Author: Ryan Farley - 1/12/2010

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
RJ,

Could it be that .NET Extensions didn't get properly registered on the machine you're on? Have you tried running the RegisterSLXNetExtentions.bat file to ensure things are registered? Try that, these should work on 7.2.

-Ryan

Author: Ryan Farley - 1/10/2010

 
Comment: Re: Leveraging .NET in SalesLogix (Applies to any version)
fiogf49gjkf0d
You can use these samples with .NET Extensions, the real difference is how you load them. Using Application.Managed just does some of the interop for you. I would suggest to look at the article on that to not get confused and then come back to these samples to tie the two together.

BTW, do you see errors trying these on 7.2? Or it just doesn't work? There's nothing that shouldn't work in 7.2 and later, the only possible thing that might need to change are the window class names in the SLX app where you are embedding your .NET app.

As far as the Interop.SalesLogix62.dll, that will still work on later versions as well (even up to 7.5.2) you just won't see anything that might have been added since 6.2 in the object model. Using an earlier version interop assembly is a great way to avoid making your addon version specific.

Author: Ryan Farley - 1/10/2010

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Kevin,

Or you could just do this:

col.PicklistName = "Registration Status"

Author: Ryan Farley - 9/22/2009

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Kevin,

Maybe try checking to make sure you're creating the correct column type. I'd suggest starting a post in the forums where you can post more of your code for us to look at.

-Ryan

Author: Ryan Farley - 9/22/2009

 
Comment: Re: Creating SalesLogix Table ID Values - The Definitive Guide
fiogf49gjkf0d
Hi Samantha,

If you want the key to be auto-created, you need to omit it from the statement completely. What you are doing is copying the accountid value in the select statement on ACCOUNT into the insert statement into PRODUCTION. Does that make sense? Take the accountid column out of your insert statement (and also the select statement). Then it *should* auto-create the keys.

-Ryan

Author: Ryan Farley - 8/13/2009

 
Comment: Re: Leveraging .NET in SalesLogix (Applies to any version)
fiogf49gjkf0d
Onam,

Are you receiving an error of any kind? I just tried downloading and I could download the source code just fine.

-Ryan

Author: Ryan Farley - 7/17/2009

 
Comment: Re: The SalesLogix URL Link
fiogf49gjkf0d
Mel,

It exists in SLX 7.5, there's no where to "see" it, it's just built in. You can test it by opening SLX and going to start|run and entering something like "slx:ACCOUNT/AGHEA0002669" (without the quotes, change that last part, the ID to be a valid accountid in your system).

-Ryan

Author: Ryan Farley - 1/21/2009

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Hello Simon,

By chance, is this on a 64-bit machine? BTW, we should probably move this to the forums.

-Ryan

Author: Ryan Farley - 9/30/2008

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Simon, what version of SLX are you on?

Author: Ryan Farley - 9/25/2008

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Hello Simon,

Are you sure your .NET Extension title is "HelloWorld"? It seems strange that this would be your title when your fully-qualified classname is "ClassLibrary1.Class1". That seems to be the most logical thing that could be causing the problem.

However, the error "Unsupported provider version" is quite odd and doesn't really match that. Can you check that the version of SLX that the extension was created with is the same as what you're using it on? Meaning the versions of "Sage.SalesLogix.NetExtensions.Core.dll" and "Sage.SalesLogix.NetExtensions.Framework.dll" used in your .NET project *match exactly* with the version of SLX you're using the extension on.

-Ryan

Author: Ryan Farley - 9/22/2008

 
Comment: Re: The ADO.NET Primer
fiogf49gjkf0d
Sara, can you confirm you're using a SLX Connection string, and not a SQL one?

Author: Ryan Farley - 8/28/2008

 
Comment: Re: Integrating MindManager With SalesLogix
fiogf49gjkf0d
Hi Phil,

I'm sure I wrote the code, but can't remember where I did that now (tool long ago). There wouldn't be too many changes from what is shown here in this article.

-Ryan

Author: Ryan Farley - 7/25/2008

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Hi Jeff,

Yes, you can use .NET 3.5 as an extension. Works fine.

-Ryan

Author: Ryan Farley - 6/26/2008

 
Comment: Re: E1 User Audit
fiogf49gjkf0d
It would be easy enough to build this for the 7.2 Web client for logins, however, for logouts it would be different. Session timeouts would reflect as a logout, even though the user might not really have inteneded to logout, per se.

Author: Ryan Farley - 6/9/2008

 
Comment: Re: SalesLogix v7 Database Schema ERD
fiogf49gjkf0d
HI Elaine,

Welcome to the site!

As far as printing these, they are quite large. What I've done with them is take them to some place like Kinkos that has a large printer or plotter. They can print them up just fine for you.

For discussions, you'll find the forums here: http://www.slxdeveloper.com/forums (There's a link across the top and also on the left side under "Community").

-Ryan

Author: Ryan Farley - 4/16/2008

 
Comment: Re: The ADO.NET Primer
fiogf49gjkf0d
Hi Jason,

I just last week migrated by SalesLogix related blog (Previously at http://www.saleslogixblog.com/) to the new CRM Developer blog hosted on customerfx.com (See http://customerfx.com/crmdeveloper/). In the migration some links did get messed up. Here is the link to the article previously mentioned: http://customerfx.com/pages/crmdeveloper/2004/02/12/creating-a-saleslogix-table-id-in-net.aspx

Although this site now has a much better article on the subject which can be found here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=87

-Ryan

Author: Ryan Farley - 4/16/2008

 
Comment: Re: Understanding the SalesLogix 6.2 Connection String
fiogf49gjkf0d
KevLar,

You can't have quotes in the middle of a string. If you do (as you have in the code you posted) it ends the string. So the error you're getting is accurate.

You can either omit the quotes and all will still work fine, or escape them. Try this:

DIM conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "Provider=SLXOLEDB.1;Data Source=SERVER;Initial Catalog=TESTSLX;User Id=admin;Password=password;Persist Security Info=True;Extended Properties=Port=1706;Log=On;"
conn.Open

-Ryan

Author: Ryan Farley - 3/12/2008

 
Comment: Re: Creating a Crystal Reports Custom Function Library
fiogf49gjkf0d
Hi Koichi. To be honest, I don't know. I've not built a UFL for many years (I wrote this article in 1999) and never did attempt with .NET.

Good luck.

Author: Ryan Farley - 1/30/2008

 
Comment: Re: Leveraging .NET in SalesLogix (Applies to any version)
fiogf49gjkf0d
NagaVarma,

That's not something we can know without seeing your code. Maybe start a thread in the forums so you can post some code for us to see?

-Ryan

Author: Ryan Farley - 1/25/2008

 
Comment: Re: Leveraging .NET in SalesLogix (Applies to any version)
fiogf49gjkf0d
NagaVarma,

To get the logged in user, you could either pass Application.BasicFunctions.CurrentUserID to the .NET code, or from the .NET code instnciate a SalesLogix.SlxApplication object and use BasicFunctions.CurrentUserID from there.

-Ryan

Author: Ryan Farley - 1/7/2008

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Hi FoolBallFan,

Yes, you sure can. I've outlined the steps on my SalesLogix related blog here: http://saleslogixblog.com/rfarley/archive/2007/08/20/37982.aspx

-Ryan

Author: Ryan Farley - 1/2/2008

 
Comment: Re: SalesLogix Synchronization Report
fiogf49gjkf0d
Mike,

If you end up making this change in the bundle, send me a copy so I can update the download on the site.

Thanks!
-Ryan

Author: Ryan Farley - 11/27/2007

 
Comment: Re: How to Save & Read Images in a SalesLogix Database
fiogf49gjkf0d
Alexander,

"Is it possible to make the same customization for WEB 7.2 form? I mean, using the standard AA things"

No. It *is* possible to build something like this for the 7.2 web client, but not in AA. You'd have to build this as a custom ASCX SmartPart and add it into the client.

-Ryan

Author: Ryan Farley - 10/29/2007

 
Comment: Re: The SalesLogix URL Link
fiogf49gjkf0d
Felipe,

No, this is for LAN client only.

-Ryan

Author: Ryan Farley - 10/22/2007

 
Comment: Re: Generically Setting a Form as Read-Only
fiogf49gjkf0d
Hi Sarah,

Yes, it does work on account tabs (or any tab form) as well. I'll probably need a bit more info on how you're using it (ie; where is the code being run from, on the account tab or from some other location, etc). Maybe start a forum thread on the topic, I'd be glad to help.

-Ryan

Author: Ryan Farley - 10/18/2007

 
Comment: Re: Creating SalesLogix Table ID Values - The Definitive Guide
fiogf49gjkf0d
Ezi,

You said:
How do I make the provider use integer values with the auto-increment

You can't. SalesLogix table I'd values are what they are. You just need to get used to working with them.

-Ryan

Author: Ryan Farley - 9/26/2007

 
Comment: Re: Integrating SalesLogix Leads with LinkedIn
fiogf49gjkf0d
Hi Ted,

To change the behavior of how the links open, you'd replace the call to Application.BasicFunctions.WebOpen with some other code. Unfortunately, there's not much exposed as far as controlling opening new tabs in IE. Your best bet would be to open the link in an existing IE window. This doesn't mean it will open in a new tab, but would more than likely be an annoyance as it would cause already opened windows to navigate away from their pages to something else. To do this you'd also have to use IE automation, which would force this to work with IE only, no Firefox or anything else.

-Ryan

Author: Ryan Farley - 9/10/2007

 
Comment: Re: How to Save & Read Images in a SalesLogix Database
fiogf49gjkf0d
@Adam,

Conversation continued here: http://www.slxdeveloper.com/forum.aspx?forumid=3003&postid=10224

-Ryan

Author: Ryan Farley - 8/23/2007

 
Comment: Re: Understanding the SalesLogix 6.2 Connection String
fiogf49gjkf0d
RJ,

In C#, you can simply escape the quotes. For example, if I want a string variable to have the contents This is a "quoted" string I need to set it as follows:

string var = "This is a \"quoted\" string";

So, for a connection string you'd escape the quotes the same way:

static string SLXconnstring = "Provider=SLXOLEDB.1;Password=\"\";Persist Security Info=True;User ID=Admin;Initial Catalog=OCC;Data Source=RJSAMP-D610;Extended Properties=\"PORT=1706;LOG=ON;CASEINSENSITIVEFIND=ON;AUTOINCBATCHSIZE=1;SVRCERT=;\"";

Make sense?

Author: Ryan Farley - 8/7/2007

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Hi Matt,

If the returned value from Application.Managed.Create is blank that would most likely mean one of two things:

1) The "Namespace.Classname" for the assembly or the "Title" as defined in the .NET Extentions manager do not match with the code you're using to invoke it. Double check that.

2) The .NET Extention files did not get properly registered on the machine you're testing on. If this is the case, you can fix this by manually running the batch file named "RegisterSLXNetExtentions.bat" found in the SalesLogix directory.

Give those a try.

-Ryan

Author: Ryan Farley - 6/25/2007

 
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Ferdi,

What does your code look like now? Are you trying to get the "Selected" row only, or any particular row? Does your grid have MultiSelect set to True or False? What version of SLX are you on?

-Ryan

Author: Ryan Farley - 6/20/2007

 
Comment: Re: Creating SalesLogix Table ID Values - The Definitive Guide
fiogf49gjkf0d
Tracy,

The problem is your connection string. You're using a native SQL connection string (and therefore the SQL provider), not the SLX provider. You need to change your connection string to a valid one using the SLX provider (e.g.: using a SLX connection string) - although I think I saw in the forums that you might have gotten that figured out??

-Ryan

Author: Ryan Farley - 5/31/2007

 
Comment: Re: How to Repair a Missing SendSLX Button using an AutoIt Script
fiogf49gjkf0d
FYI,

This article was converted with David's permission from the following forum thread: http://www.slxdeveloper.com/forum.aspx?forumid=5003&postid=7596

Ryan Farley
slxdeveloper.com

Author: Ryan Farley - 4/25/2007

 
Comment: Re: .NET SlgxApi.dll Managed Wrapper
fiogf49gjkf0d
Hi Tim,

First of all, if you're on 6.2.3, *DON'T* use the SlgxApi. The SlgxApi is only still there for backwards compatibility. Not only that, it doesn't work well from a web app.

What you should be using is the SLX OLEDB Provider. You'll use the standard ADO.NET classes to work with the SLX data. Reading via SELECT queries and writing via INSERT/UPDATE statements. As long as you're doing it via the SLX provider then all is good. You'll find articles in the OLEDB section of this site (See http://www.slxdeveloper.com/page.aspx?id=15) that will give you the info you'll need, such as he connection string to use, how to create table ID values for new inserts, etc.

Make sense?

-Ryan

Author: Ryan Farley - 4/17/2007

 
Comment: Re: The ADO.NET Primer
fiogf49gjkf0d
Faisal,

That is correct. SLX stores all datetime values in UTC format. The SLX OLEDB Provider does a conversion of these date/time values based on the users local timezone so the can display properly. If you read directly from the database (not using the SLX provider) you'll get the dates as UTC, not their actual value, so things like activity times will be significantly off, based on the local user's UTC offset.

The SLX OLEDB Provider is just a normal OLEDB Provider. It get's installed with SLX and you can also install it separately on a machine without SLX installed. As long as it is installed you just need to use the correct connection string (and use the proper System.Data.OleDb namespace classes, instead of the SqlClient ones). You can see more about the SLX connction string here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=55

There are articles on this site, as well as the forums, that should get you going in the right direction.

-Ryan

Author: Ryan Farley - 4/3/2007

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Hi Craig,

I do know that the BIA is comprised of .NET and SQL views, but I don't know more about it than that. I've never used it or anything. Taking SLX out of the picture, how would you use it normally? Is it just a .NET assembly that you would add a reference to normally? If that is the case you'd just reference it by your .NET Extension and it would get pulled in as a reference by the .NET Extension Manager (so you're not exactly adding the BIA to the .NET Extension manager, you're adding it to your own .NET project - it is your .NET project that uses the BIA that gets added to the .NET Extension manager)

Hope this helps.

-Ryan

Hope this helps.

Author: Ryan Farley - 3/30/2007

 
Comment: Re: Installing v5.2 and v6.0 on the same machine
fiogf49gjkf0d
Hi Ian,

I'm happy to say I don't any have 5.2 systems I get into enough to have even tried doing this with v7 installed. I would guess that the steps would be the same.

However, the recommended route is to use a virtual environment for one of the systems (VMWare, VirtualPC, etc)

Author: Ryan Farley - 3/22/2007

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Hi preston.

I don't see anywhere in your SLX code where you are capturing the return value. Assuming that the line:

string result = t.LoadStaging("200701");


Really is returning a value into "result" (where you later return), you should be able to get that value in SLX by modifying the line:

Application.Managed.Run ext, args


to the following:

myResult = Application.Managed.Run(ext, args)


the variable "myResult" would now contain the return value. Make sense?

Author: Ryan Farley - 3/7/2007

 
Comment: Re: A Guide to The .NET Extension Deployment Attributes
fiogf49gjkf0d
Thanks Dave. You know, this does happen to be the *only* place you'll find this documented as well :-p

-Ryan

Author: Ryan Farley - 3/2/2007

 
Comment: Re: Crystal RDC Help Files
fiogf49gjkf0d
Thinking a bit more, all the code I wrote for working with RDC in earlier versions still works fine with XI R2, so yes, these files will still apply (although might be missing something new here or there)

Author: Ryan Farley - 2/13/2007

 
Comment: Re: Crystal RDC Help Files
fiogf49gjkf0d
Thinking a bit more, all the code I wrote for working with RDC in earlier versions still works fine with XI R2, so yes, these files will still apply (although might be missing something new here or there)

Author: Ryan Farley - 2/13/2007

 
Comment: Re: Crystal RDC Help Files
fiogf49gjkf0d
Hi John,

I believe that the Crystal RDC objects in XI R2 haven't changed much as far as the base objects go. There has likely been more added to the object model, but these docs should still match up fine for the basics.

-Ryan

Author: Ryan Farley - 2/13/2007

 
Comment: Re: Leveraging .NET in SalesLogix (Applies to any version)
fiogf49gjkf0d
Thanks RJ!

Author: Ryan Farley - 1/11/2007

 
Comment: Re: E1 User Audit
fiogf49gjkf0d
Added updated bundles from Mike.

Per Mike:
The bundle now stores the machine name and login name as well as the last 5 logouts (as well as the last 5 logins)

Thanks Mike!

Author: Ryan Farley - 11/20/2006

 
Comment: Re: How To: Set Mouse Cursor in Legacy Views
fiogf49gjkf0d
The only methods available (unless you roll your own COM exposed object to call from your scripts) are Form.Cursor and Control.Cursor. This will change the cursor over the object (ie: form) in question. A bit limited, but the only built-in methods to change the cursor.

Author: Ryan Farley - 11/14/2006

 
Comment: Re: Database Document Generator
fiogf49gjkf0d
Yes this does work on SLX 6.2. It actually uses an ODBC DNS for the connection so it doesn't really matter that it is SLX at all or some other database. You just create a DNS to point to the database in question and then use this.

The DNS part is a pain. I'd love it if this used an OLEDB connection instead, but I've never gotten around to changing this. Also, this is written in VB6 which I haven't had installed for years. At some point I'd like to rewrite this in C# and make source available. But, for now, this one will still work.

-Ryan

Author: Ryan Farley - 10/13/2006

 
Comment: Re: Creating SalesLogix Table ID Values - The Definitive Guide
fiogf49gjkf0d
Oops! Forgot I wasn't allowing table tags in the comments :-p (you can still see what I mean, although it looks a mess)

Author: Ryan Farley - 10/11/2006

 
Comment: Re: Creating SalesLogix Table ID Values - The Definitive Guide
fiogf49gjkf0d
Hi Joe,

As far as the expections go, there are differences in using the table name vs the name that SLX uses for these tables internally. Creating an ID for "ATTACHMENT" will produce a difference ID value than creating an ID value for "FILEATTACH" and that's where the problem is. Internally, when you add an attachment to a record, when SLX adds the record to the ATTACHMENT table it uses the alias "FILEATTACH" to create the table ID value. So, if you then programatically add a record to the ATTACHMENT table and you use "ATTACHMENT" to create the ID value then you're getting the ID value from a different "pool" and you have the possibility of having a conflict with identical ID values.

For example, if you repeatedly create table ID values for both ATTACHMENT and FILEATTACH you might end up with the following:

<table border=0><tr><td>ATTACHMENT</td><td>FILEATTACH</td></tr>
<tr><td>0001</td><td>0005</td></tr>
<tr><td>0002</td><td>0006</td></tr>
<tr><td>0003</td><td>0007</td></tr>
<tr><td>0004</td><td>0008</td></tr>
<tr><td>0005 Conflict!</td><td>0009</td></tr>
</table>

You can see that eventually we started to attempt to create conflicting ID values and our users will be getting errors and no one will be able to add attachments because it keeps failing due to the conflicting ID values.

For whatever reason, SLX uses these aliases instead of the table names internally when creating ID values, so if we don't use the same we are likely to end up with these conflicts eventually.

Does that make sense?

-Ryan

Author: Ryan Farley - 10/11/2006

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Article has been updated for SalesLogix v7 Gold release syntax.

-Ryan

Author: Ryan Farley - 9/25/2006

 
Comment: Re: How to Connect to External Data Using ADO
fiogf49gjkf0d
Hi Andrew,

Move this question into the forums, I'll post an answer there (this could get a bit involved and I don't want to clutter up the comments under this article too much and have your question get lost for others searching for it)

Thanks,
-Ryan

Author: Ryan Farley - 9/18/2006

 
Comment: Re: How to Launch a Contact Process via Script
fiogf49gjkf0d
I know you wrote all of this 4 years ago, but it's still as good now as it was then! Thanks Walter!

Author: Ryan Farley - 8/29/2006

 
Comment: Re: SQL Profile Template
fiogf49gjkf0d
Thanks for this Timmus!

-Ryan

Author: Ryan Farley - 8/25/2006

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d
Josh,

Haha. :-)

-Ryan

Author: Ryan Farley - 8/24/2006

 
Comment: Re: .NET SlgxApi.dll Managed Wrapper
fiogf49gjkf0d
Chris,

You can go the route of adding the SalesLogix directory to the path, that does work, or just place the SlgxApi.DLL into a location already in the path (such as the system32 dir - which is where I would put it). As long as you see the path where the DLL is located when you type "PATH" at a command prompt (this will list the contents of the path environment variable) then it should work fine. The wrapper does not specify location, so it does rely on the DLL to be found in the path.

-Ryan

Author: Ryan Farley - 8/22/2006

 
Comment: Re: Creating SalesLogix Table ID Values - The Definitive Guide
fiogf49gjkf0d
Hehe. Thanks Thomas!

-Ryan

Author: Ryan Farley - 8/14/2006

 
Comment: Re: SalesLogix Web Services Toolkit
fiogf49gjkf0d
Thomas,

To be honest I haven't really read the doc, but I just took a look at the GenerateSLXID function. It looks fine to me, but the connection string used (and connection object) are defined elsewhere, outside of the function. So it would depend on how those are defined as to whether it would work or not.

What error do you receive?

-Ryan

Author: Ryan Farley - 8/8/2006

 
Comment: Re: E1 User Audit
fiogf49gjkf0d
Just wanted to let everyone know that Mike updated the bundle to include the ComputerName and LoginName. From Mike:

"Following feedback from David Henry at National City Mortgage I added the ComputerName and the LoginName (that the client logged into via) to this util"

Thanks Mike!

-Ryan

Author: Ryan Farley - 7/24/2006

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Binu,

When you set up a grid, the primary key for the base table is assigned as the KEYFIELD property. This is the value you will retrieve with calls to grid.selection.item(i). This is also the field that you have to explicitly add to the fields in the grid (and make hidden) in order for calls to grid.selection.item(i) to work.

-Ryan

Author: Ryan Farley - 7/19/2006

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Binu,

There is a bug with the grid, but you can work around it by adding the primary key field to the grid and making it hidden. Then you will be able to get the selected rows. Make sense?

-Ryan

Author: Ryan Farley - 7/19/2006

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
FYI, this feature will be renamed from ".NET Forms" to ".NET Extensions" in the next release of v7. Yay!

Author: Ryan Farley - 5/22/2006

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Kevin, version 8 - code named Gila Monster :-D

Author: Ryan Farley - 5/16/2006

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Christian,

Yes. It should work fine on Express (although I can't test to tell you for sure since I don't have Express installed anywhere)

-Ryan

Author: Ryan Farley - 5/15/2006

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Steve,

Well, the fact that you're writing your code outside of SLX would mean that you could reuse code in other areas, however there is nothing built into the Web Client that allows for any use of .NET assemblies. You would have you build your web customizations in ASP.NET in order to reuse code. So I guess the answer is "yes, but no". Hehe.

-Ryan

Author: Ryan Farley - 5/15/2006

 
Comment: Re: Introduction to .NET in SalesLogix Version 7
fiogf49gjkf0d
Thanks Ted!

Author: Ryan Farley - 5/13/2006

 
Comment: Re: E1 User Audit
fiogf49gjkf0d
Post has been updated with Mike's new bundle. If you previously downloaded the bundle before please download and reinstall. The new posted bundle contains Mike's fixes, so the previously mentioned issues are no longer present.

Thanks.
-Ryan

Author: Ryan Farley - 5/1/2006

 
Comment: Re: E1 User Audit
fiogf49gjkf0d
MB,

If you're looking directly at the table keep in mind that all dates/times are stored in UTC. When you view the date/time in SLX the SLX provider calcuates the date/time value based on your offset (ie: makes it *your* local time). This is normal.

-Ryan

Author: Ryan Farley - 4/19/2006

 
Comment: Re: E1 User Audit
fiogf49gjkf0d
MB,

The sxb file extension is for a SalesLogix bundle. Think of this as an install for the addin. To install this bundle in SLX you need to open the Administrator and then go to the Bundles section on the side nav bar. Then right-click to browse to this sxb file, and then install it. Once installed you can dispose of the sxb file.

-Ryan

Author: Ryan Farley - 4/17/2006

 
Comment: Re: E1 User Audit
fiogf49gjkf0d
Sam,

In the Architect, you have to go to "Tools", "Client Options" and then in the DBOpen event select the script plugin Mike mentioned. In order for the values to populate this script needs to fire when the database is opened by a user.

Make sense?

-Ryan

Author: Ryan Farley - 3/21/2006

 
Comment: Re: The SalesLogix URL Link
fiogf49gjkf0d
Hi Sam,

The bundle provided was intended to be just a quick sample to demonstrate how to build the URL/link from the current record in SalesLogix. If this was to be used for production, I would opt to not just shell a mailto link, but instead I would create an actual Outlook MailItem so you could format the body of the e-mail as HTML and have the URL appear as a hyperlink. I would have the hyperlink show the record name, not the URL, so the end result would be like:

Record Name

Know what I mean? Do a quick google search for "Outlook MailItem" and you're bound to find some good examples for creating HTML e-mail's for Outlook.

Author: Ryan Farley - 3/21/2006

 
Comment: Re: The SalesLogix URL Link
fiogf49gjkf0d
I've updated the bundle to contain a sample bundle with a toolbar. Enjoy.

Author: Ryan Farley - 3/20/2006

 
Comment: Re: The SalesLogix URL Link
fiogf49gjkf0d
Sam, an excellent question for the forums!

Meanwhile, I'll update the zip to include a sample bundle with the toolbar button (but still worth posting the question to the forums since you might get an answer before I'm able to update it!)

Author: Ryan Farley - 3/20/2006

 
Comment: Re: The SalesLogix URL Link
fiogf49gjkf0d
Thanks Rob. I know. I first built a "URL Link" sort of thing for SalesLogix about a year and a half ago. After I built it I was amazed that it wasn't just a built in part of SLX because it made so much sense. After some talk about it at a SLX meeting with some other BPs (and with it coming in v7 as a built in part), I figured it was time to write it up for the site.

-Ryan

Author: Ryan Farley - 3/13/2006

 
Comment: Re: SalesLogix Synchronization Report
fiogf49gjkf0d
Sam,

I've not used the sendMail.dll before that Mike used in this article, but it looks like it might be written in VB6 or prior and requires some files that might be missing.

Best bet is to search for MSWINSCK.OCX and you're bound to find some places to download it (as well as complete VB runtimes) that appear to be needed for that DLL to work.

-Ryan

Author: Ryan Farley - 2/7/2006

 
Comment: Re: SalesLogix Synchronization Report
fiogf49gjkf0d
Sam,

If you created the SYNC_REPORT table when logged in as the sysdba user then you should prefix it with "sysdba." (unless your connection string specifies sysdba as the user you're logging in with). If the table is not owned by sysdba (which sounds like this is your case), just omit the table owner prefix before the table name.

-Ryan

Author: Ryan Farley - 2/7/2006

 
Comment: Re: SalesLogix Synchronization Report
fiogf49gjkf0d
Sam,

Maybe you could just change it to convert to USA (101) or default (0 or 100) instead of removing it?

ie:

Change from this:
convert(datetime, '" & f.DateLastModified & "',103)

to this:
convert(datetime, '" & f.DateLastModified & "',101)

Give it a try. BTW, I've not run this myself, but I believe my support guys did without issue.

-Ryan

Author: Ryan Farley - 2/7/2006

 
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Billy,

As far as sortable grids go, what I usually do is create the grid at design time and then set things to sortable, but then at run time I just do my own stuff. IIRC the sortable setting usually sticks in this case.

-Ryan

Author: Ryan Farley - 2/6/2006

 
Comment: Re: SalesLogix Synchronization Report
fiogf49gjkf0d
Hi Sam,

Just a few guesses here (I didn't write this one but thought maybe I could proide some insight).

1) Did you create the SYNC_REPORT table?
2) Did you modify the script to point to the correct location for sync files?

Anyway, just a few things to look at to hopefully get this working.

-Ryan

Author: Ryan Farley - 2/6/2006

 
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Hi Mary,

I'm not sure I understand your question, could you restate?

Thanks,
Ryan

Author: Ryan Farley - 12/28/2005

 
Comment: Re: How to update Data with Updateable RecordSets
fiogf49gjkf0d
Mike.

Hehe. That survey would produce some doozies! Don't you just hate to work with some SQL strings and have to go back to modify things later!

But you want to know what is really funny? The SQL statement Kris used in the article is from one of my first articles I posted to this site! (See http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=9). Hehe. Live and learn. I cringe at the sight of a SQL statement like that now. Pretty funny.

-Ryan

Author: Ryan Farley - 11/2/2005

 
Comment: Re: Generically Setting a Form as Read-Only
fiogf49gjkf0d
Anyone needing to do this with legacy forms can check this out: http://saleslogixblog.com/rfarley/archive/2005/11/01/11937.aspx

-Ryan

Author: Ryan Farley - 11/1/2005

 
Comment: Re: Total Control Lookups
fiogf49gjkf0d
Ted,

You know, I've thought that many times. I do plan on doing that, but we'll see...

Thanks,
-Ryan

Author: Ryan Farley - 10/31/2005

 
Comment: Re: E-mail Address Validation
fiogf49gjkf0d
Thomas,

Excellent use, and example, of using Regular Expressions in SalesLogix. Great article.

-Ryan

Author: Ryan Farley - 10/31/2005

 
Comment: Re: Total Control Lookups
fiogf49gjkf0d
Ted,

Maybe it would work to try:

If Not Lookup Is Nothing Then
'...
End If

or something? Maybe even checking to see if Lookup.ID exists would work?

Worse case, you could always preceed everything with a:
On Error Resume Next

-Ryan

Author: Ryan Farley - 10/31/2005

 
Comment: Re: How to update Data with Updateable RecordSets
fiogf49gjkf0d
Great article Kris. I've had this topic on my list of articles to write for quite some time now, good to see I won't have to anymore. This is an article that has been needed here for some time now.

Thanks!
-Ryan

Author: Ryan Farley - 10/28/2005

 
Comment: Re: Total Control Lookups
fiogf49gjkf0d
I don't believe the 3rd edition is available yet, although I do believe it is coming soon.

I'm sure Stephen will chime in and let us know when to expect it.

-Ryan

Author: Ryan Farley - 10/27/2005

 
Comment: Re: Detecting the Version of the Installed SalesLogix OLE DB Provider
fiogf49gjkf0d
Christian,

Check the DBTYPE field on the SYSTEMINFO table where SYSTEMINFOID = 'PRIMARY'.

If 1 Then Main database
If 2 Then Remote database (ie: remote user)
If 3 Then Remote Office database

-Ryan

Author: Ryan Farley - 10/17/2005

 
Comment: Re: The SalesLogix CheckListBox Control
fiogf49gjkf0d
Great stuff Kris. It's about time we get some of the SLX controls "documented" ;-)

-Ryan

Author: Ryan Farley - 10/7/2005

 
Comment: Re: Customizing SalesLogix with ASP.NET Applications
fiogf49gjkf0d
Great stuff, Stephen. I look forward to the release of DevLogix 3rd edition.

-Ryan

Author: Ryan Farley - 10/7/2005

 
Comment: Re: How to use COALESCE with SalesLogix Queries
fiogf49gjkf0d
Good stuff Eugenio.

-Ryan

Author: Ryan Farley - 9/20/2005

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d
That's a great idea RJL. I'll have to add that into my toolbox version of this script.

-Ryan

Author: Ryan Farley - 9/6/2005

 
Comment: Re: Improving SalesLogix Performance
fiogf49gjkf0d
Joseph,

You'll need to turn on the advanced options. Something like this:


exec sp_configure 'show advanced option', '1'

--Then you'll see this message
/*Configuration option 'show advanced options' changed from 0 to 1.
Run the RECONFIGURE command to install.*/

reconfigure

--Now you can run this to see advanced configuration options
exec sp_configure

--Or set the advanced option
sp_configure 'network packet size', 8192
reconfigure with override


-Ryan

Author: Ryan Farley - 8/26/2005

 
Comment: Re: How to Connect to External Data Using ADO
fiogf49gjkf0d
Nick,

The concept is the same. The connection string is the key part in connecting to any data source. However the objects used a quite a bit different. You use DataReaders, DataAdapters, and DataSets, instead of Recordsets. While there are still connection and command objects as in classic ADO, the practice of how they are used will differ in some regards. ADO.NET uses primarily a disconnected model, as opposed to classic ADO which is almost entirely connected.

That said, as far as connecting to different data sources, the concepts are the same, more or less, as described in this article.

-Ryan

Author: Ryan Farley - 8/16/2005

 
Comment: Re: SalesLogix Synchronization Report
fiogf49gjkf0d
Christian,

You certainly can use the sendmail.dll from a SLX script - it is simply a standard COM dll. However, that does mean you need to distribute the DLL and register on all client workstations.

-Ryan

Author: Ryan Farley - 8/8/2005

 
Comment: Re: Generically Setting a Form as Read-Only
fiogf49gjkf0d
Thanks RJL. Having it all in a class yeilds other unseen benefits since you can add other form manipulation stuff to the class and now you have this nicely wrapped class that extends the form to add all this extra functionality.

Also, I wanted to point out, that because you pass in a reference to the form, instead of just having this be a function in the form's script itself, that you are able to pass in a reference to other forms also - not just the current form you are on.

So you are able to do something like this:

Dim frm

Set frm = New FormWrapper
frm.Form = Application.Forms("System:SomeOtherForm")
frm.ReadOnly = True

And set other forms as read only as well. Makes it even more flexible.

-Ryan

Author: Ryan Farley - 8/3/2005

 
Comment: Re: How to Save & Read Images in a SalesLogix Database Sample Bundle
fiogf49gjkf0d
Doh! You're right. Looks like I forgot to add the table. I've updated the bundle to include the missing table. Thanks Neil.

-Ryan

Author: Ryan Farley - 8/2/2005

 
Comment: Re: MindManager Map for SalesLogix 6.2
fiogf49gjkf0d
Nice work. It's useful even to just see what areas are hard-coded, views, forms, etc.

-Ryan

Author: Ryan Farley - 8/2/2005

 
Comment: Re: Building a SalesLogix Login Screen
fiogf49gjkf0d
Just so everyone knows, I finally got around to updating this article for SalesLogix 6.2. The sample code download has also been updated for 6.2 (the 6.1 sample code is also still available).

-Ryan

Author: Ryan Farley - 7/28/2005

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Ingmar,

To tell the truth I've not tried to bind a grid column to a image in the database - but I doubt the SLX grid control will be able to do that. Since the options are icon & text (or default which still just means icon or text) my guess is that the only thing you'll get to display is an icon indicating that there is BLOB data there, but not the image itself. You'll probably have to use some other 3rd party grid control.

-Ryan

Author: Ryan Farley - 7/18/2005

 
Comment: Re: Quick DB Setup - Quickly setup new SalesLogix Databases
fiogf49gjkf0d
Steve,

It only works for v6, v5.x uses BDE alias and things get quite a bit different there.

-Ryan

Author: Ryan Farley - 7/18/2005

 
Comment: Re: Configuring SalesLogix 6.2 For Microsoft SQL 2005 Express Edition
fiogf49gjkf0d
Karina,

Not sure if this would help, but a new article discussing using SalesLogix 6.2 with SQL2005 Standard Edition was just posted to slxdeveloper.com. See http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=65

-Ryan

Author: Ryan Farley - 7/7/2005

 
Comment: Re: Integrating MindManager With SalesLogix
fiogf49gjkf0d
Joseph,

The key is whether or not FreeMind exposes some sort of API or COM layer - or it's file format can be written to in some easy manner. Free is always nice, but while MindJet's MindManager has a high price-tag, it is well worth it IMO. The exposed object model is so complete and very well put together that you feel like you're programming against a uilt in MS Office app. You can get a free viewer app from MindJet also.

That said, it would be interesting to take something free like FreeMind and wrap it in an ActiveX control to display right in SLX forms.

-Ryan

Author: Ryan Farley - 6/27/2005

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Doug,

To use a memo field in the grid, you cannot use a Standard column type (ctStandard = 0). You must change the column type to a memo column type (ctMemo = 14) and then set the PaintStyle property to a 2 (bpsText) to display the contents as text.

-Ryan

Author: Ryan Farley - 5/23/2005

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Matt,

To format a value as a phone number requires the use of 6.2 or higher. In 6.2 you can do the following:

DataGrid1.Columns(index).FormatType = 7 'ftPhone

If you are using a version prior to 6.2 then your only hope is to create the column at design time and set the format type property for the column or do any formatting in the SQL the grid is bound to (and hope the provider doesn't choke on it).

-Ryan

Author: Ryan Farley - 5/23/2005

 
Comment: Re: Creating DataGrid Columns at Runtime
fiogf49gjkf0d
Brian,

Note this only works with 6.2 or higher - To create a picklist column you do the following:

Set col = DataGrid1.Columns.Add(15) 'ctPickList
col.PickListName = "My Picklist"
col.Caption = "My Picklist Column"
col.FieldName = "MYFIELD"

-Ryan

Author: Ryan Farley - 5/23/2005

 
Comment: Re: How to Save & Read Images in a SalesLogix Database
fiogf49gjkf0d
Kris,

Thanks for the comments. SalesLogix actually did make this a little easier - as far as providing a location that could be written to without the user needing any elevated rights. There is now a function under Application.BasicFunctions called "GetPersonalDataPath". This function returns a path that the user is guarnteed to be able to write to. The path is the "SalesLogix" directory under the users "My Documents" folder.

You could safely use this (Application.BasicFunctions.GetPersonalDataPath & "\MyFile.bmp") to write out the file and would not have to worry about permissions or related issues.

-Ryan

Author: Ryan Farley - 5/19/2005

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d
Hi Scott,

Yeah, I came accross that same thing. I added a check to make sure that .GetCurrentField <> "" before attempting the invoke which made it an easy fix. The best part is that if you're using this in a reusable include script then you just need to fix the one place and it effects every grid that uses it.

-Ryan

Author: Ryan Farley - 3/31/2005

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d
Jonathan,

There's no built in way. You just read the ID for the selected row (or rows) and execute the necessary delete statement(s). You can still make it generic, reading the table name, ID field, etc from the grid control.

-Ryan

Author: Ryan Farley - 3/22/2005

 
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Christian,

There's no string length limit that I've ever run into. The problem is likely nothing to do with the length, but moreso with the syntax of the query. Keep in mind that the provider does pick apart every SQL statement and rebuilds it so that I can append the appropriate security details into the query. If you're using some combination of syntax that the provider has a hard time understanding then it will fail, even though it might be a valid SQL statement when running it in Query Analyzer. If you're using 6.2 you can use SQL views, maybe that is a route you could take? Otherwise it is a matter of reconstructing the query yourself to find some syntax that the provider does not have issues with.

-Ryan

Author: Ryan Farley - 3/15/2005

 
Comment: Re: SalesLogix 6.1 Procedures
fiogf49gjkf0d
Saurabh,

To use the SalesLogix OLEDB Provider, you need to ensure that you are using the right connection string for the version of SLX that you have installed. The SLXOLEDB.1 provider corresponds to SLX version 6.2 (See http://www.slxdeveloper.com/page.aspx?id=35&articleid=55). If you are using version 6.0 to 6.1.1 then you'll use SLXNetwork.1 (See http://www.slxdeveloper.com/page.aspx?id=35&articleid=7). If you are using 5.x or prior then none of this applies since it did not have an OLEDB Provider. But for any v6.x then you must have at minimum the SLX Provider installed on the machine you're using.

An easy way to build a SLX connection string for the provider installed on your machine is to use the DataLink Designer that I have in the utilities section of this site (See http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=36). It invokes the standard DataLink dialog and allows you to set the properties and then provides you with the complete connection string (Make sure you choose the SalesLogix provider from the "Provider" tab).

Good luck.

-Ryan

Author: Ryan Farley - 2/24/2005

 
Comment: Re: SalesLogix 6.1 Procedures
fiogf49gjkf0d
Saurabh,

As long as your connection is using the SLX OLEDB Provider (See the related articles above for an article on the SLX connection string) then the provider will handle all sync logging for you (Assuming you haven't set "logging" to "off" in your connection string.)

-Ryan

Author: Ryan Farley - 2/23/2005

 
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Hi Kannan,

To use a different column type, other than standard, you would create it as that type. This would create a Combo column:

Set col = DataGrid1.Columns.Add(8)

I listed the column types for version 6.0 in a previous article: http://www.slxdeveloper.com/devhome/page.aspx?id=35&articleid=6 However, one thing to know, working with specific column types only works in 6.2. The needed interfaces & objects were not exposed in v6.0-v.6.1.

I'll actually have an article at some point on working with these in v6.2, but that all depends on my work load to get that done, too busy at the moment ;-)

-Ryan

Author: Ryan Farley - 2/3/2005

 
Comment: Re: Building a SalesLogix Login Screen
fiogf49gjkf0d
The sample code is written for use with 6.1 (Note the provider in the connection strings in the code as SLXNetwork.1 instead of SLXOLEDB.1) If you are using it with SLX v6.2 then you will get the errors you mentioned (because the connection string is incomplete for 6.2 and causes the provider to throw the exception). To make the sample work with 6.2, all that is needed is to change the code that forms the connection string. If I get a chance I'll update the sample to work with 6.2 also.

As far as casting the return from the GetNewConnection of the SlxApplicationClass as an OLEDB connection, that will never work. You cannot cast an ADO Connection as an OleDbConnection.

-Ryan

Author: Ryan Farley - 1/24/2005

 
Comment: Re: Using Classes in VBScript
fiogf49gjkf0d
Hehe. Thanks Christopher. BTW, I don't believe it is documented (if it is I have not come across it yet)

-Ryan

Author: Ryan Farley - 12/1/2004

 
Comment: Re: Using Classes in VBScript
fiogf49gjkf0d
Christopher,

To be clear, this really does not have to do with classes in VBScript. However, there is a way to do what you are looking for. I am not sure which version this was introduced in, it might be 6.1.1 (I know it works in 6.2, just not sure if it works in prior versions). The form reference will have a 'Script' property which will give you access to the script on that form.

So you get a reference to the form and use it like this:

Application.Forms("System:MyForm").Script.MySub

to access the sub "MySub" on the form "System:MyForm". Got it?

-Ryan

Author: Ryan Farley - 12/1/2004

 
Comment: Re: .NET SlgxApi.dll Managed Wrapper
fiogf49gjkf0d
JM,

The main benefit you get using .NET for building SLX addons, is that you are able to use current development practices in a real development environment, using object oriented techniques, current tools etc etc etc. The list is limitless. And compare that to the alternative to using VBScript plugins in SLX and there's little comparison. The downside as you mentioned is that you are not able use have the ease of synching customizations and a simpler model for developing customizations. I don't argue that there is no benefit to using Architect to develop customizations. However, I don't rule out the "best tool for the job". When building the customizations outside using C# is the best fit for the job then that is what I use. If that route is overkill and using Architect makes most sense then that is what I use. But as my C# code library grows for building SLX addons, I find that is what I use more. Deployment has never been an issue for me. It just becomes a normal part of the SLX installation.

-Ryan

Author: Ryan Farley - 11/16/2004

 
Comment: Re: How to Connect to External Data Using ADO
fiogf49gjkf0d
Patsy,

Wouldn't it be nice if I could get all the articles I've started at some point completed. Problem is that my interest of what I want to write about changes from time to time and if I didn't complete an article before then it usually doesn't get done.

With the 800 or so users registered on this site, I doubt I am the only one with knowledge to put an article together. I'd love to see articles submitted from others as well (hey, I still have to work for a living too) ;-)

-Ryan

Author: Ryan Farley - 11/11/2004

 
Comment: Re: Understanding the SalesLogix 6.2 Connection String
fiogf49gjkf0d
David,

I have a post on my SLX related blog that goes into this. However, as Todd Hardin mentions in the comments, it does not take daylight savings into consideration.

See http://saleslogixblog.com/rfarley/archive/2004/11/01/1159.aspx

-Ryan

Author: Ryan Farley - 11/8/2004

 
Comment: Re: The Myths and Legends of Prepared Queries
fiogf49gjkf0d
Stuart,

As always, great info. Glad to see your comments here.

-Ryan

Author: Ryan Farley - 9/22/2004

 
Comment: Re: The ADO.NET Primer
fiogf49gjkf0d
Yes, I create ID values from .NET all the time. Just about every project I do for SLX is in C#. Never had an issue. Are you sure you're using a connection via the SLX provider and not native SQL?

There's C# sample on my SLX related blog here: http://saleslogixblog.com/rfarley/archive/2004/02/12/340.aspx

-Ryan

Author: Ryan Farley - 9/20/2004

 
Comment: Re: Detecting the Version of the Installed SalesLogix OLE DB Provider
fiogf49gjkf0d
Glad it helped Ted!

-Ryan

Author: Ryan Farley - 9/19/2004

 
Comment: Re: How to Create a View in a SalesLogix Database that Points a Table in a Different Database on a Different Server
fiogf49gjkf0d
Hi Rich,

Good question. It should work to simply delete the entry from the RESYNCTABLEDEFS table. You'd want to do it in a way that allows it to sync out since the original entry would have synched out to remotes as well.

Let us know if that works (or doesn't work)

-Ryan

Author: Ryan Farley - 9/15/2004

 
Comment: Re: Consuming SalesLogix Data via RSS
fiogf49gjkf0d
Mike,

You could control that (enforcing rules that disallow URLs where the ID has been stripped out) easily in the code. You'd simply add code that checks for the ID value passed in the QueryString and in the case where it is missing you'd return back a single item containing a message that said something to indicate to contact your company for a proper URL.

Another option is to use authentication of some kind. RSS does support all standard HTTP authentication mechanisms, the same way you'd secure a web page. You just have to make sure you use a reader that supports it also (which most do). You could do something that route and the ID wouldn't be needed at all since you could just display the data based on the authenticated user.

BTW, RSS is the way to go for something as you described. That is the kind of scenario that it is intended for. Far better than mass e-mailing, faxing, etc. However, some people are still behind the tech-curve when it comes to RSS, so it is not a bad idea to provide an alternate route also.

-Ryan

Author: Ryan Farley - 9/9/2004

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d
Jeremy,

That is strange. I do know for a fact that it *was* working properly pre-SP2. I haven't verified it or anything on a system with SP2 installed yet. I'm out of my office currently doing a DTS class so can't check it now, but I'll do so when I am back in my office to we can get it reported as a bug if needed.

Thanks,
-Ryan

Author: Ryan Farley - 8/18/2004

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d
Sean,

It does work exactly the same way both ways for me, whether invoked via right-click or from a call to ShowViewForRecord. Try explicitly passing the values you need to the call to ShowViewForRecord (instead of dynamically getting the properties from the grid) and see if you get the same results. If you do then possibly something is wrong with the Form, if not then something might be wrong with the setup of the grid.

-Ryan

Author: Ryan Farley - 8/17/2004

 
Comment: Re: How to generically invoke the edit form for a SalesLogix datagrid
fiogf49gjkf0d
Sean,

As long as the grid is properly set-up then you can add in the same way mentioned in this article (which is also mention in the comments here by Jeremy) by passing a blank value as the ID to ShowViewForRecord. If the grid is not set up correctly then you'd have problems as you would not be able to grab the right values generically from the grid's properties.

-Ryan

Author: Ryan Farley - 8/17/2004

 
Comment: Re: Using Code Templates in Saleslogix 6.x to Develop Class Objects
fiogf49gjkf0d
Jiho,

Not a bad idea. That definately saves some time from creating the stubbed functions. I really don't develop much in the Architect, but I suppose that at least this gives you a better place to write out the code. However the differences between VB and VBScript could lead to some frustrations. It sure would be nice if they'd just open up the Architect to extending via custom DLLs or a plugin SDK of sorts.

-Ryan

Author: Ryan Farley - 7/23/2004

 
Comment: Re: Using Code Templates in Saleslogix 6.x to Develop Class Objects
fiogf49gjkf0d
Jiho,

First of all, TextPad is great. I use it too. You can build clip libraries of commonly-used code so it just inserts entire blocks of a predefined code structure. Syntax highlighting and all etc.

Second, as far as getting intellisense in the VS IDE, there really is no need for extensibility, all you need is a class containing stubs for the SLX functions as static members. For example, if you wanted to program in the VS.NET IDE, you could add a class named "BasicFunctions" in the "Application" namespace (or just alias the Imports statement as Application - or you could create Application as a class with a static property your BasicFunctions class object to make things more accurate) with static (or shared in VB terms) members like this:

Public Shared Function EditActivity(ByVal ActivityID As String) As Boolean
Return True
End Function

Public Shared Property CurrentAccountID As String
Get
Return String.Empty
End Get
End Property

Get the idea? Then just add the class or reference the DLL containing the class and away you go, you now have intellisense for the SLX functions and objects. Sure it is tedious to create the stubs for all the functions, but you only need to do it once. For using the VB6 IDE it is even simpler. Just add a module and stub out the functions as public functions. Easy enough.

I'd go nuts if SLX opened up the Architect with a pluggable architecture. I'd be developing my own enhancements like crazy. If they'd just expose some APIs for dealing with plugin development I'd just write my own IDE altogether ;-) Wouldn't that be great (but like Scott, I don't see that happening, but maybe if we squeak enough?)

Author: Ryan Farley - 7/22/2004

 
Comment: Re: Using Code Templates in Saleslogix 6.x to Develop Class Objects
fiogf49gjkf0d
Really awesome stuff Scott & Brett! Now this is the kind of stuff I love to see. Time to bring SLX development up-to-date and take advantage of great tools like CodeSmith.

Great job! (BTW, I am fixing the site so I can list multiple authors for an article. Don't want to leave you out Brett)

-Ryan

Author: Ryan Farley - 7/22/2004

 
Comment: Re: Using Classes in VBScript
fiogf49gjkf0d
Steve,

Sure, I use ByRef parameters when needed, however they would not have been needed in this example. ByRef works the same in VBScript as it does in regular VB.

-Ryan

Author: Ryan Farley - 7/10/2004

 
Comment: Re: Understanding the SalesLogix OLE DB Connection String
fiogf49gjkf0d
Rich,

The 6.1 provider does not allow for stored procedures to be called. However, there is some hope coming in 6.2.

-Ryan

Author: Ryan Farley - 6/25/2004

 
Comment: Re: SalesLogix 6.1 Procedures
fiogf49gjkf0d
Hi Michael,

Take a look at the article at http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=7 (mentioned in the Related Articles) for information on building a SLX connection string. From the call to sp_AliasList you can retrieve the aliases from a server, then with the alias selected (along with the server name) you can build a connection string, minus the RWPass for a writable connection. You can obtain the RWPassword to build a complete connection string, take a look here: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=34 (also mentioned in the Related Articles above).

-Ryan

Author: Ryan Farley - 6/16/2004

 
Comment: Re: Database Document Generator
fiogf49gjkf0d
RJ, I totally agree. I've always hated that I have to create a DSN to use this! It is in dire need of an update to get rid of that.

Thanks,
-Ryan

Author: Ryan Farley - 6/14/2004

 
Comment: Re: The Myths and Legends of Prepared Queries
fiogf49gjkf0d
Great stuff Stuart. It is awesome to see something from you here! Thanks.

-Ryan

Author: Ryan Farley - 6/11/2004

 
Comment: Re: Master/Detail Forms & LookupEdit Sample Bundle
fiogf49gjkf0d
Hi Bob,

No, I use the "common" workaround for that to just grab it from the DB using the LookupID when the form opens up. I have a utility script I pass the LookupEdit to and it does it all based on the properties set on the control.

Easy enough code, just a one-liner:
SetLookup lueContact

Author: Ryan Farley - 6/8/2004

 
Comment: Re: Understanding the SalesLogix OLE DB Connection String
fiogf49gjkf0d
Alexander,

You have this:
INSERT INTO sysdba.ACCOUNTPRODUCTGROUPS (ACCOUNTID,PRODUCTGROUP) VALUES ('AA2EK0013017','Audio');

1) No need for the sysdba part, get rid of that.
2) Drop the semi-colon from the end.

ie:
INSERT INTO ACCOUNTPRODUCTGROUPS (ACCOUNTID,PRODUCTGROUP) VALUES ('AA2EK0013017','Audio')

-Ryan

Author: Ryan Farley - 5/26/2004

 
Comment: Re: SalesLogix Picklister (Updated for version 6)
fiogf49gjkf0d
I've finally updated this utility to work with version 6. It still does use the SLX API (so that still needs to be in the path) but at least it no longer relies on BDE etc.

-Ryan

Author: Ryan Farley - 4/22/2004

 
Comment: Re: Consuming SalesLogix Data via RSS
fiogf49gjkf0d
Thanks Jeremy,

I agree. RSS is just too awesome. The wave of the future. I'm almost to the point now where I open my RSS reader more often than my browser! It is great to decide what information you want and just subscribe so it comes to you instead of going out looking for it. I've got my own custom feeds running all over my network. I've got a feed that notifies my wife of new Mp3's I've added to my collection, an Windows Event Log feed so I can subscribe to new entries in the logs on remote web servers I monitor, and just about anything you can think of.

I'd love to see some of this kind of stuff built into the Web Client. Make it so a user can be notified of things happening in the database on a subscription basis - so they can choose which information they want to see. And you could easily make it so the feeds use the userid to limit it to the data they have access to.

I am an RSS fiend.
-Ryan

Author: Ryan Farley - 4/15/2004

 
Comment: Re: Consuming SalesLogix Data via RSS - RSS now available on slxdeveloper.com!
fiogf49gjkf0d
For anyone interested, the slxdeveloper.com Latest Article RSS feed is now available at: http://www.slxdeveloper.com/articlerss.aspx

-Ryan

Author: Ryan Farley - 4/12/2004

 
Comment: Re: Consuming SalesLogix Data via RSS
fiogf49gjkf0d
BTW, the recent articles RSS feed for slxdeveloper.com will be up next week ;-)

-Ryan

Author: Ryan Farley - 4/8/2004

 
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Christian,

You *don't* want to pass the grid name as a string. Instead you pass it as an object. I have a script where I do the same. I pass the grid itself and the SQL string.

For example, if I have a grid on a form named "datagrid1", and I want to pass it to a generic FillData method, I would pass it like this:

FillData datagrid1, "select * from account"

And the FillData method would look something like this:

Sub FillData(grid, sql)

With grid
' now do the stuff with the grid object
' ...
.SQL.Text = sql
' ...
End With
End Sub

Got it? -Ryan

Author: Ryan Farley - 3/26/2004

 
Comment: Re: Dynamically Creating DataGrid Columns
fiogf49gjkf0d
Binu, to set the width you could just follow this up with lines such as:

With datagrid1.Columns
.Item(0).Width = 150
.Item(1).Width = 75
End With

As far as the Fields collection, that is part of ADO. If you google for "ADO Fields collection" I am sure you'll find many resources. Also there is a good ADO reference book featured on the home page of this site.

-Ryan


Author: Ryan Farley - 3/25/2004

 
Comment: Re: Understanding the SalesLogix OLE DB Connection String
fiogf49gjkf0d
Doh! Thanks Larry, good catch. I typically don't use VB, I am a semi-colon curly-brace kind of guy so I really should have checked before. Thanks.

Author: Ryan Farley - 3/23/2004

 
Comment: Re: Understanding the SalesLogix OLE DB Connection String
fiogf49gjkf0d
Eric,

Yes all dates need to be ISO formatted dates. While in VB you can use the Format function, however, you'll need to modify it a bit from what you have. There needs to be a space between the date and time portions, and colons separating the time parts. This should give you a proper ISO formatted date for the SLX provider:

Format(Now(), "YYYYMMDD HH:MM:SS")

Keep in mind however that you only need to format the date this way when using the date as a string in a SQL statement, not when using parameterized queries or updateable recordsets. You can take a look here for more info: http://saleslogixblog.com/rfarley/archive/2004/03/02/392.aspx

Author: Ryan Farley - 3/17/2004

 
Comment: Re: Understanding the SalesLogix OLE DB Connection String
fiogf49gjkf0d
Eric,

Yes, use the slx_getNativeConnInfo procedure to return the underlying native connection string used by the provider. This will tell you based on the provider name in that string if it is SQL or Oracle.

-Ryan

Author: Ryan Farley - 3/16/2004

 
Comment: Re: The ADO.NET Primer
fiogf49gjkf0d
That is true. That is the typical error you see when not supplying the RWPass. Good catch Gary.

-Ryan

Author: Ryan Farley - 3/15/2004

 
Comment: Re: SalesLogix Synchronization Report
fiogf49gjkf0d
Kevin,

I use this with Exchange. I opened Exchange for SMTP that is allows only from the machine this is run on. As far as connecting to Exchange direct without the use of SMTP (I see no benefit in doing this) a Google search should reveal some code that could be translated to VBScript easily.

Author: Ryan Farley - 3/11/2004

 
Comment: Re: Connecting with the RWPassword From External Applications
fiogf49gjkf0d
Carlos & Micah,

The localhost thing is actually from the original beta architecture of the provider. This was changed in the final release of v6 and is not meant to be anything other than 'localhost'. Even changing it to something else - you would still need the provider installed locally anyway so it knows what 'SlxNetwork.1' means.

Micah, take a look at this article discussing the SLX connection string for more info: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=7

Carlos is correct, you would need the provider installed on the web server in order to use the SLX provider and have things synchronize.

Author: Ryan Farley - 3/11/2004

 
Comment: Re: Quick DB Setup - Quickly setup new SalesLogix Databases
fiogf49gjkf0d
Nathan,

I assume that this utility just uses the local default instance of SQL, right? So with that being the case, you have to run this on the SQL server itself. Would this cause any problems if you do not have the SLX server installed or even the SLX provider for that matter on that same box?

Also, this does not give you any way to specify which SQL instance you want to restore to. That would be a great addition to the app. Is there any possibility of doing that now? (ie: specify which instance?)

Thanks, Ryan

Author: Ryan Farley - 3/8/2004

 
Comment: Re: SalesLogix Sync Report
fiogf49gjkf0d
Excellent stuff Mike. Thanks for sharing.

-Ryan

Author: Ryan Farley - 2/11/2004

 
Comment: Re: SalesLogix 6.1 Procedures
fiogf49gjkf0d
Jeremy,

Excellent suggestion. It would be a great line of articles to take each of these procedures and explain them in detail (and include the why you use them as well). I didn't mean for this article to serve much purpose other than to provide a place of reference where I could refer back to in future articles. But some detail on these procedures would be great.

Thanks, Ryan

Author: Ryan Farley - 1/26/2004

 
Comment: Re: How To: Set Mouse Cursor in Legacy Views
fiogf49gjkf0d
Now if only you could "include scripts" for legacy basic plugins like you can with the new VBScript plugins. Would make things much easier to only have to include this each time you needed it.

-Ryan

Author: Ryan Farley - 1/24/2004

 
Comment: Re: Trouble connecting to the database...
fiogf49gjkf0d
Eric,

Never had that error occur. Could it be something wrong with your query? I have many C# apps that read data from SalesLogix via the SLX provider and do all kinds of things with the data - including binding to grids. Never a problem.

-Ryan

Author: Ryan Farley - 1/23/2004

 
Comment: Re: LogSetGlobalID
fiogf49gjkf0d
Peter,

LogSetGlobalID is no longer required in v6. That is done automatically by the SalesLogix OLEDB Provider. So, the history record will automatically go out to the remotes who receive the related account.

-Ryan

Author: Ryan Farley - 1/9/2004

 
Comment: Re: evaluating what the user selected from grid...
fiogf49gjkf0d
What happens if you reference the field by name (instead of grabbing the key field value by not specifiying a name)?

ie:
val = dgEQP.GetCurrentField("myfieldname")

Also, do you have the grid grouped by a column? I know that this can at times effect what GetCurrentField returns.

-Ryan


Author: Ryan Farley - 11/11/2003

 
Comment: Warning about the OA_TABLES view
fiogf49gjkf0d
I thought I should mention, the method of altering the OA_TABLES view that was brought up in some of these comments may introduce some issues with SLX 6.2. The OA_TABLES view will no longer be used in 6.2 which means it will no longer be created on new installs.

So, don't grow to rely on that method too much as you'll be stuck when you start seeing new 6.2 installs and it doesn't exist.

-Ryan

Author: Ryan Farley - 10/6/2003

 
Comment: Re: You should be able to access forms via their name...
fiogf49gjkf0d
Tim,

I believe that was fixed in v6.1. When this article was written that way did not work (as mentioned in the article). But good point, I should update the article to mention that this is now possible. Thanks.

-Ryan

Author: Ryan Farley - 10/6/2003

 
Comment: Re: This is great! But what about future upgrades?
fiogf49gjkf0d
Martin, on the contrary. When ever SLX releases new versions of existing forms, there will be a conflict as you'll need to either scrap your form and use theirs to get any new functionality, or you'll need to built the new functionality into your existing form. However, encapsulating code into classes that you could use as include scripts minimizes the amount of logic you have scripted behind the actual form itself. So, your conversion process to the new form will likely be much easier since there will be less code to transfer to the new form to bring over any current customizations.

But, all in all, there is no way to avoid the need to convert as SLX releases more forms as active forms.

-Ryan

Author: Ryan Farley - 10/6/2003

 
Comment: Re: Great tip...
fiogf49gjkf0d
Dave, I can't take credit for this one, this was by Stephen Redmond. But to answer your question, you could look at the available methods or properties in any object browser, such as the one that is built in to VB. Looking at the MailConnection object discussed in this article, you'd look at the objects exposed by the file "SLMailClient.exe". Here's a dump of the methods exposed there (although you'd really want to look at it with an object browser - I'm only posting the methods, not the properties etc. Also I am not posting anything from the "Mail" class which would be useful to use since that is where all the events are defined)

Dispatch
IMailConnection
{624DDEA2-70F1-11D1-B877-0000B4552A26}
Version 1.0
Functions

Mail
Help string: Pointer to global mail object
Connected
Help string: Do we have a connection ?
LastComposeResult
Help string: Get Last Compose Modal Result as Integer
SessionID
Help string: Session (OLE Auto Client) ID as Integer
AddrBookFieldCount
Setup
Help string: Execute Mail Setup Dialog as Integer
LogOn
Help string: LogOn into Mail system as Integer
LogOff
Help string: LogOff from mail system as Integer
Send
Help string: Send Mail as Integer
Parameters
aSave
SetMailField
Help string: Set Mail Field by Field ID as Integer
Parameters
aField
Value
GetMailField
Help string: Get Mail Field by Field ID as Integer
Parameters
aField
EngineOn
Help string: Create MailEngine Object as Integer
EngineOff
Help string: Destroy MailEngine Object as Integer
UIOn
Help string: Show Main Form Object as Integer
UIOff
Help string: Hide Main Form Object as Integer
Compose
Help string: Open Compose window Object as Integer
Parameters
aSave
IsCompose
Help string: Is Compose window open as Integer
Parameters
aID
About
Help string: About Info window open as Integer
DeliverNow
Help string: Deliver Now window open s Integer
AddrBookUIOn
Help string: Show Address Book UI as Integer
AddAddressBook
Help string: Add Address Book UI as Integer
Parameters
aName
aFile
aReadOnly
DelAddressBook
Help string: Delete Address Book as Integer
Parameters
aName
UpdAddressBook
Help string: Update Address Book as Integer
Parameters
aName
aRecords
ZapAddressBook
Help string: Clear all records in Address Book as Integer
Parameters
aName
AddrBookRecipientsUIOn
Parameters
OwnerWnd
Field
Recipients

Hope this helps - Ryan

Author: Ryan Farley - 10/6/2003

 
Comment: Re: SLX 6.1...
fiogf49gjkf0d
Enrico, Hey that is cool info. I just tried this and it worked great. Pretty cool.

-Ryan

Author: Ryan Farley - 7/30/2003

 
Comment: Re: The sql statement below....
fiogf49gjkf0d
>>Does that work on 6.0 too?

Unfortunately not. SalesLogix 6 appears to use both the USERID *and* the sitecode as the encryption seed, so you can no longer use a generic encrypted "blank" value for the admin user as before - but only a matter of time ;-)

-Ryan

Author: Ryan Farley - 7/2/2003

 
Comment: Great info Stephen
fiogf49gjkf0d
I didn't even know you could use the SalesLogix Mail Client to do this. Great info.

-Ryan

Author: Ryan Farley - 6/14/2003

 
Comment: Excellent...
fiogf49gjkf0d
Excellent article David. I know that this is something that many SalesLogix implementations would benefit from. Probably not done more often because people are unsure how to accomplish it. It is great to have it so clearly documented here.

-Ryan

Author: Ryan Farley - 6/13/2003

 
Comment: Re: Best approach instead of COUNT(*)...
fiogf49gjkf0d
Great point Jake. Definately the best way to do it. Just to stress that you want to make sure you're using a true non-nullable primary key (which is what you're saying to do), because NULLs won't be included in the count when you count on a specific field. (Not to say that you didn't know that Jake, but wanted to clear that up for any others).

-Ryan

Author: Ryan Farley - 6/12/2003

 
Comment: Re: Populating a datagrid from an external datasourse in v5.2...
fiogf49gjkf0d
Personally, I would write it as an external application, like in VB or similar. Then you could launch it and pass any ID values on the command line to the app. The app would be responsible for gathering the external data and bind it to a grid. If you wanted to keep it inside of SLX, then would it be possible for you to create a SQL view in the SLX database to view this data? As long as the view is owned by sysdba then you can select it as the table for a SLX grid.

-Ryan

Author: Ryan Farley - 5/15/2003

 
Comment: Re: Updating SLX using ADo and creating TEF files...
fiogf49gjkf0d
As long as you use the SalesLogix OLEDB provider for performing your updates or inserts then the creation of TEF files happen automatically. The SalesLogix provider takes care of all of that for you. So, really, the only thing you have in your code other than straight ADO is a connection string to the SLX database via the provider. (See: Understanding the SalesLogix OLE DB Connection String)

If you are dealing with a version of SalesLogix prior to v6, then you cannot write to the database via ADO since v5 and prior does not have an OLEDB provider to use. You'd have to use the SalesLogix API (SlgxApi.DLL) to write to the database from external apps from older versions using methods such as slapi_DBExecuteSQL etc.

-Ryan

Author: Ryan Farley - 4/26/2003

 
Comment: Re: Syncing changes to remotes...
fiogf49gjkf0d
With all this coding going on for External apps, do these changes or updates create TEFS for the remotes?

Absolutely! In the code in this article we are using the SalesLogix OLEDB Provider, anything we write to the database via the provider will synchronize, just as if it was done through the sales client. Essentially, the sales client writes to the database in the same way, just be performing inserts/updates/etc via the provider. The provider takes care of the creation of sync logs.

In versions prior to v6, you can still write sync aware to the database, but since the provider does not exist for these older versions, you would need to write all data to the database via the SlgxApi.DLL instead of ADO or ADO.NET.

Don't be afraid to do things outside of SalesLogix - it is a great way to break the barriers of the sales client and develop some really great addons for SalesLogix.

-Ryan


Author: Ryan Farley - 4/26/2003

 
Comment: Re: SQL Parse error...
fiogf49gjkf0d
Very strange join syntax you're using there. The SLX Provider does not like any kind of cross-join (which you're syntax looks a lot like to me).

Instead always use explicit inner/outer/left/right/etc joins. Re-do your query.
-Ryan

Author: Ryan Farley - 4/14/2003

 
Comment: Re: Question to All/Author...
fiogf49gjkf0d
As far as adding conditions, all you'd really need to do is add them to the where clause of the SQL string (and refresh if the gird was already set up).

Rich, in your example, all you'd need to change is to make sure you're appending the string containing the current userid. Like this:

strUserId = Application.BasicFunctions.CurrentUserID
strSQL = "SELECT A1.LASTNAME, A1.FIRSTNAME, A1.ACCOUNT FROM CONTACT A1 LEFT JOIN ACTIVITY A2 ON (A1.CONTACTID=A2.CONTACTID) WHERE (A2.TYPE=262146) AND (A2.USERID= '" & strUserId & "')"

That's it. If the grid was already set up (ie: already has the columns) then you'll have to refresh it after adding the condition.

-Ryan

Author: Ryan Farley - 3/27/2003

 
Comment: Re: Formatting Question...
fiogf49gjkf0d
>Are these properties exposed?

Not yet. There are many of the "extended properties" that you can't get to as of yet. This is the case for many of the non-standard column types as well. You can do things like create a checkbox column, but can't get to the properties specific to the checkbox column to set it's properties. But even on the standard column type, you cannot get to things like FormatType property yet. I assume that SLX will expose these objects in a future release.

For now, the workaround I use for format type is to do all the formatting in the SQL statement I bind to the grid. Know what I mean? Eventually these objects will be exposed and I'll write a followup article on the subject. I haven't seen this change in the SP1 beta yet, so it might not be until 6.1.

-Ryan

Author: Ryan Farley - 2/24/2003

 
Comment: Re: Related Question
fiogf49gjkf0d
Bob,

This is a bug in the current version. It refreshes fine after Adds & Deletes, but not Edits. This is the case for *any* datagrid that has been launched on a modal form (ie: It does not happen for a grid on the A/C/O detail screens or a tab).

Haven't checked yet if it is on the list for fixes in SP1.

-Ryan

Author: Ryan Farley - 2/17/2003

 
Comment: Re: Tab control...
fiogf49gjkf0d
Yes Tab Control is broken and will be fixed in SP1. The problem exists when you either rename a control you've dropped on the tab, or attempt to move (or paste) an existing control into the tab. So, solution is to drop directly from toolbox into the tab and then don't rename them (or drop a panel first onto the tab, which you don't rename, and then drop all other controls into it).

The problem you describe with the v6 DataGrid applies when the grid is on a form that is "launched" modally. It will not work unless the grid has "something" in the BindID. So, I'll just put something there like "SOMEVALUE", but not put anything in the bind side in the query. Then all works well. Of course, you can just set the SQL and set up the columns and this is not a problem (BindID ot not).

Glad you like the site.
-Ryan

Author: Ryan Farley - 2/11/2003

 
Comment: Re: Data Link files...
fiogf49gjkf0d
True, you can use UDL files to create connection strings, however, it is still important to understand the various parts of any connection string so you know exactly what you're creating.

To assist in creating connection strings, I uploaded a utility which makes it easy to create connection strings (sits in tray for easy access). Take a look here:
http://www.slxdeveloper.com/devhome/page.aspx?id=35&articleid=36

Author: Ryan Farley - 2/4/2003

 
Comment: Differences in v6 install...
fiogf49gjkf0d
With version 6, the install does *not* add the location of the SlgxApi.DLL to the path. In order to be able to use this (or any application that uses SlgxApi.DLL) with version 6 you'll need to add "C:\Program Files\SalesLogix" to the system's PATH as the SLX installer does not do that with v6 as it did in previous versions.

However, the v5 install does add it to the path so the DLL can be accessed from anywhere by other applications.

One thing to note, is that this assembly was written long before v6 came out so it was not tested with v6 (and I still have not tested it with v6 either)

Once you add the location of SlgxApi.DLL to your path it should work fine.

-Ryan

Author: Ryan Farley - 1/17/2003

 
Comment: Thanks...
fiogf49gjkf0d
Thanks guys. It was a little sneaky to put it on the re-cert exam since it hasen't been documented anywhere (at least no where that I've come accross yet - and I've read about all the docs released in the SDK). I actually wrote this article a while ago but was holding off on putting it on the site. I was not sure if SLX wanted the information known by the masses - especially when it did not appear in the docs. But, hey, if it's on the test you're going to have to learn about it somewhere ;-)

-Ryan

Author: Ryan Farley - 1/15/2003

 
Comment: Re: More articles on DataGrid...
fiogf49gjkf0d
I do plan to write several more articles on the DataGrid. Some may get into how to work around some of the current problems & deficiencies the DataGrid has, but most will look at how to use more of the many undocumented parts of the DataGrid.

-Ryan


Author: Ryan Farley - 1/10/2003

 
Comment: Re: Thanks RJ...
fiogf49gjkf0d
The article that shows how to dynamically create the columns based on the fields in the query is complete. See 'Related Articles' above.

-Ryan

Author: Ryan Farley - 12/14/2002

 
Comment: Re: Question to the Author...
fiogf49gjkf0d
That is true, you wouldn't want to hide field names such as PUTRID, BICUSPID, or FLACCID (wow, wouldn't those be some useful fields!). Maybe a better approach would be to alias all fields with some standard convention to indicate it should be hidden. Then you could alias all fields you want hidden with something like MYFIELD AS NOVIS_MYFIELD and then look for any field starting with NOVIS and mark it as a hidden field. This way you could have extra details with each row in the grid to make it easy to grab when a user clicks on a row.

-Ryan


Author: Ryan Farley - 12/11/2002

 
Comment: True Mike...
fiogf49gjkf0d
Thanks for bringing that up. Since the Fields collection is the default indexed property, you can also access the values with the shorter syntax:

sVal = rs(0).Value

And, since the Value property is the default property of a Field object, you can make it even shorter, like this:

sVal = rs(0)

However, I always prefer to be explicit when accessing properties so I go for the full syntax. I feel it leaves less ambiguity for others that may read your code later and leaves less "to chance". Not only that, if you use a With block, you'll have to access it via the Fields collection explicitly anyway:

With rs
sVal = .Fields(0).Value
End With

-Ryan

Author: Ryan Farley - 12/6/2002

 
Comment: I'm sure they are...
fiogf49gjkf0d
I am sure they are pissed at the idea of trying to support problems that might occur by having both installed together. BUT, there was a huge concern in the business partner community about not being able to run both - since we will be supporting both for quite some time to come. It is not reasonable to think that we will all use one of the versions via VMware or something. Could you imagine if you had to run a large import in a virtual VMware OS? Not a good scenario, you're already sharing mememory between the two OS's. I could not imagine working that way. I am sure there are issues and it is definately one of those "do at your own risk" kind of thing.

Anyway, I think whoever put this out the info used in this article *should* receive credit, and be commended, for realizing a huge need in the BP community and sticking their neck out for us.

-Ryan

Author: Ryan Farley - 12/5/2002

 
Comment: Re: Speed...
fiogf49gjkf0d
I suppose I could live with that. I've removed the CustomerFX stuff at the end of the exported file (now there is no footer info). The splash screen stays (which does look a little prettier now). I built this a few years ago for my support people and I've never really used it myself. I forgot what an ugly app it was, so I've cleaned it up a little.

Anyway, re-download the file to get the new version.

-Ryan


Author: Ryan Farley - 12/4/2002

 
Comment: Nice catch Ted. Thanks.
fiogf49gjkf0d
Doh! Thanks for catching that one Ted. Yes, I did mean DBCreateIDFor. I'll update the article to actually say what I mean!

Also, glad you like the site. I am working on a lot of new articles and hope to get the site filled with useful content. I hope it catches on and others will submit content too. There's a lot of features coming - including the option to "watch" the discussion for an article so you are notified when comments are added (I hate to have to keep checking back).

Anyway, thanks again.

-Ryan

Author: Ryan Farley - 12/3/2002

 
Comment: Thanks RJ...
fiogf49gjkf0d
The article that covers what you mentioned is "in the works" and coming soon.

-Ryan

Author: Ryan Farley - 12/2/2002

 
Comment: Reading each record...
fiogf49gjkf0d
As far as reading each row, that what the loop is doing.

While Not (rs.EOF Or rs.BOF)
'do something with current row here
rs.MoveNext
Wend

Reading the fields is easy. The Recordset has a Fields collection. You can access fields from the collection by name or by index.

sVal = rs.Fields("myfield").value
-or-
sVal = rs.Fields(0).value

I usually append a blank string to the end to avoid having to check if it is null (so if null it will then be a blank string so I won't get errors if I try to use the value)

sVal = rs.Fields("myfield").value & ""

Another article is coming soon (almost done) that will show common ADO items and how to translate the v5 way of doing things (DBOpenSQL to ??? kinds of stuff) to the v6/ADO way.

-Ryan

Author: Ryan Farley - 11/27/2002

 
Comment: About the 'History' class implementation...
fiogf49gjkf0d
The bundle contains an implementation of a 'History' class for adding SalesLogix history items. While it is pretty complete, it's intended purpose is for demonstration only. I failed to mention however that it is for PUBLIC use. Do with it what yo will, but there are no guarntees, etc. Strictly a use at your own risk type thing, etc.

Anyway. Have fun with it. Use classes in your development and you'll never be sorry that you took the time to to write good code. -Ryan

Author: Ryan Farley - 11/14/2002

 
Comment: Credits...
fiogf49gjkf0d
Please note in the 'Notes & Credits' section that this information was taken from a handout from SalesLogix at the Business Partner conference. I wish I knew who put that together so I could credit that person. If someone knows who it was then send me an e-mail. Chris, was it you?

-Ryan

Author: Ryan Farley - 11/14/2002

 


 
 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): 10/10/2024 3:20:53 AM