Login / Register  search  syndication  about

          Ryan Farley's Blog

Ryan Farley on .NET Development with a focus on CRM Development for SalesLogix

Sublogix, Simple Repository for SalesLogix - Now Available!

Sublogix, the simple repository and entity model for SalesLogix, is now available via the NuGet package management system! You can now easily get Sublogix to use in your own custom SalesLogix projects. Best of all, you can get it easier than ever using the NuGet package management system.

What is Sublogix?


Before you continue, if you've not yet seen the previous posts & videos on Sublogix, take a look. This will change how you do custom SalesLogix development.

What is NuGet?


NuGet is a new open source initiative from Microsoft. Package management is something we've been missing in the .NET world. Ruby has Gems, Clojure has Maven. So, what is "package management"? It is a way for you to discover & use assemblies in your development. Without package management, to use some DLL from somewhere, such as log4net as an example, you need to go track down where to download it from. Then get the DLL in place where it will work with source control, add a reference to it, wire it up in your config file, not to mention if the DLL has dependencies - you have to do all this for those too. Later, if you want to get a newer version you'll go through all of that again. With package management, you don't really worry about any of that. You add the log4net package to your project and it downloads the DLL, places it in a location that will work with source control, wire up any needed config, and even do the same for dependencies. Even get updates to the DLL later if you want. NuGet is a completely awesome start at package management for .NET. To get it, all you need to do is go into the Extension  Manager in Visual Studio and find/install NuGet tools (the video below shows you how to do this). Whether you end up using Sublogix or not, you're completely crazy if you don't use NuGet for other things. Go get it.

How to Get Sublogix Using NuGet

Enough talking, let's take a look at how to install NuGet and then use NuPack to easily add Sublogix to a Visual Studio project. NOTE: When the video was recorded, NuGet was called NuPack so keep in mind that when I mention NuPack, just think NuGet.

Watch the Sublogix video on YouTube
The video will open on youtube.com in a new window

What Are You Waiting For?

I'd love to get feedback on what would make Sublogix even more useful. I'm releasing it free to use under the GPLv3 license. It's closed source for now, but I wanted to get it out there for others to use. Documentation is coming, but you'll likely find everything you need from my previous two posts mentioned at the beginning of this article. Have fun!

What's This?
Bookmark and Share

About Ryan Farley

   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 the SalesLogix Mobile Seveloper Series
View the SalesLogix SData Developer Series
View the Git for the SalesLogix Developer series

Related Content
   Can I Bind an Attachment to a Specific Activity in Infor CRM version 7.54?
Recently I had a user ask if they could bind an attachment to a specific Activity within Infor CRM??
Posted on Jul 07, 2015 by Dale Richter to Infor CRM Questions & Answers
   Infor CRM (formerly SalesLogix) Administrator Locked Out
I thought I had seen all the issues affecting the datalink but this was a new one. We could not login t
Posted on Jun 18, 2015 by Mark Duthoy to SalesLogix Support
   How do I remove users from my Infor CRM system (formerly SalesLogix)?
I had an Administrator ask me for the steps they needed to take in order to remove a user from the Infor
Posted on May 08, 2015 by Dale Richter to Infor CRM Questions & Answers
   Infor CRM (Formerly Saleslogix) v8.1 update 03 and 05- Uncaught Error Scheduling Contact Processes
 In the Infor CRM (formerly Saleslogix) web client, under the Contact area you have the ability to s
Posted on May 07, 2015 by Kris Halsrud to Kris Halsrud's Blog
   Better Code Organization for Infor CRM (Saleslogix) Mobile Customizations
When customizing the Infor CRM (Saleslogix) Mobile client, it's common for the ApplicationModule to g
Posted on May 05, 2015 by Ryan Farley to Ryan Farley's Blog


Twitter Trackbacks for Sublogix, Simple Repository for SalesLogix - Now Available! - Ryan Farley's Blog [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Sublogix, Simple Repository for SalesLogix - Now Available! - Ryan Farley's Blog         [customerfx.com]        on Topsy.com

October 21, 2010 5:41 PM

Michael Seeger said:

Thank you for this great stuff! I've been following your posts on SubLogix for just a little while and I have to say that this was a very quick final release and it fortunately prevents me from developing this kind of DAL by myself ;-). So I'm going to use SubLogix - definitely - for my planned Slx .Net Extensions and external .Net Applications.

Keep on this briliant work!


October 22, 2010 3:08 AM

Michael Seeger said:

O.K. I made my first tests ...

... and had to stop because the T4 template is not able to cope with a German "PrettyName" (the German translation of the "Displayname" is not that stunning) and before I try to rearrange all the field and table displaynames to fit the needs of the template I'd like to ask for the following: Would it be possible to create some additional "PrettyName" methods that refer to the regular table / fieldname (instead of the Displayname)? And ... it would be great to have them some kind of camel cased and not completely uppercased.

Having these additional "PrettyName" methods wold make it possible to use them alternatively in the T4 template to make generation of code more independent from localized SLX versions.

Another question: Will there be some kind of communication platform like a forum for SubLogix?



October 22, 2010 9:43 AM

Ryan Farley said:

I will add a switch you can use to create the entity model from the field names only (and not the display names). I'll msg back here when it is ready for you (or you can follow @Sublogix on Twitter for updates as well).

I am putting a website (or maybe just a sub-site on customerfx.com) where I will have a possibly a forum and documentation. The @Sublogix twitter account can receive replies as well that I will reply to for now as well.

October 22, 2010 10:54 AM

Ryan Farley said:


I've added a change to the templates so the settings template provides a value you can set to indicate whether or not to use display names or just the field names for property values. At some point I will just detect invalid chars in the displayname and then use field name instead, but at least for now you can specify to use one or the other.

I've sent a pull request to the NuPack Packages project on Codeplex, so as soon as they pull the change containing my new package you'll be able to get it. I'll announce it on the @Sublogix twitter account.


October 22, 2010 4:38 PM

Ryan Farley said:


Sublogix version is now live in NuPack. You can add the reference or update from console to get the new version. Take a look at the new SublogixSettings.ttinclude template file and set false to the UsePrettyNames property.

Let me know how it goes. Thanks!

October 22, 2010 4:56 PM

Michael Seeger said:


I get the error message "No overload for method 'GetSchema' takes 5 arguments (Line9 / Column 18)" ...



October 25, 2010 12:43 PM

Ryan Farley said:


Is this on a new project or one that Sublogix was already added to previously? It could be that the Sublogix templates were updated but not the DLL. At least that is what it sounds like. The templates aren't able to use the referenced version of Sublogix and instead look for it in the bin\debug folder. So, if you do a build first it will copy the new version there and should work (you'll likely need to remove the templates in order to build since the error would have produced a blank .cs file - or just delete the SublogixEntityObjects.cs file created by the templates).

Make sense?

October 25, 2010 6:04 PM

Michael Seeger said:

Hi Ryan,

O.K., that made sens - defnitely!

But there is still a problem. When I now generate the EntityObjects (UseDisplayNames set to false) I finally get a System.ArgumentNullException (Parameter name: key) ... at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) ... After that I tried to find out what caused the problem and by looking through the code of the 'GetSchema(String, String, String, Boolean)'-Method with Reflector, I first encountered that the bool parameter 'UsePrettyNames' was not used ... found the place in code where I suppose the problem appears: It's in the inner foreach loop of then 'GetSchema(String, Boolean)'-method where you do a "dictionary.Add(key, key)".

I would have liked to debug the code and step through to make sure that this problem is not caused by my German SLX database but I unfortunally don't have is so the only thing at the moment is to make assumptions like above ... sorry.



October 26, 2010 4:34 AM

Michael Seeger said:


I copied the code from 'GetSchema(String, Boolean)' into a test application and stepped through it. Indeed there is a (customized table) where the code comes to the conclusion that its key already exists tried to find out what went wrong.

I finally could set UsePrettyNames to false and everything went fine ;-). So my request would be  to fix the 'GetSchema(String, String, String, Boolean)'-method (see my previous comment) and maybe intercept the ArgumentNullException like this:

if (key != null) dictionary.Add(key, key);

(suggested by ReSharper *G*)

Thanks in advance!


Case 2: UsePrettyNames = false:

October 26, 2010 7:42 AM

Michael Seeger said:

... please ignore the last line in my previous post ...

October 26, 2010 7:49 AM

Rich said:

Ryan, this is only a feature for VS 2010 ..?? How can I get the Sublogix .DLL into vs 2008 ..?


November 2, 2010 1:43 PM

Michael Seeger said:


in default of the possiblity to generate a proper model of my (custom) databases I finally concentrated on using the built-in Model of SubLogix. First of all: The basic functions work fine but ... I miss LINQ functionality ;-) ... I know that you already told that Sublogix is not LINQ capable, yet ... At the moment I've got one question: How do I achieve to get all contacts within an adhoc group? The capability of joining data is of big interest for me.


November 4, 2010 3:45 AM

Chad Crabb said:


It looks like they have renamed NuPack to NuGet.  Thought you may want to update your post to reflect this change.

Thanks for the great work on this.  I am excited to try it out.


November 24, 2010 1:45 PM

Chad Crabb said:

I also noticed that the template for custom entities does not work well with properties that are named the same as the entity (noticed the same issue with sData) or properties with a "#" symbol in them.

Is this the best place to post questions / issues?


November 24, 2010 2:18 PM

Mark said:

Is there support for VS 2008? Can I copy the dll over to a vs 2008 project

December 16, 2010 5:58 PM

TSturr said:


Finally getting some "down time" to explore some of these other options.  Just an FYI on the naming, MS Marketing seems to have gotten hold of the name nupack and it is now nuget which threw me off when I was going through your video.

In any case, looking forward to utilizing this exciting tool.

February 20, 2011 4:50 AM

RJSamp said:

Running through last years demo.....with the latest NuGet downloads.

Am getting an error whilst doing the update button event:

Repository.GetByID not found.....

June 18, 2011 10:11 AM

Ryan Farley said:

RJ, make sure you have a repo object you're calling the method on. In the line you posted above you have a upper case R on Repository, so it might be looking for a static GetByID method there instead of in an instance of a Repository object. Does that make sense?

August 9, 2011 1:41 PM

slxnewbie said:

Hi Ryan, I am using sublogix repository in my applications. And I am trying to use transactionscope in my c# code but it dosent work.I got following error message ..

"The ITransactionLocal interface is not supported by the 'SLXOLEDB.1' provider.  Local transactions are unavailable with the current provider"

so I hard coded my connection string and made the "OE DB Services = -4"from -1 ..so now dsent error but ..the transaction doesnt work as a unit of work if one of the 2 save fails..and the primary data get commited causing data discrepancy..Any ideas for making this work?

December 8, 2011 8:02 AM

Ryan Farley said:

Hi slxnewbie,

To be honest, I've not used transactions with Sublogix, however, it's all just ADO.NET under the covers so using transactions outside of Aublogix should work - however, the bigger concern is the version of SLX you are using. Not all versions of the SLX provider support transactions. From the error you're seeing I would guess that is your issue (Sorry, I can't remember which version added support for transactions, but IIRC it is a fairly recent version).


December 15, 2011 10:05 AM

slxnewbie said:

Thanks for the reply Ryan! I am running slx ver

I trying to use plain ado.net and transaction with custom stored procs. It dosent throw any error (while running/compile) but the data is not commited in the database after transaction.commit();

When I look at the slxprofiler the calls to the multiple stored procs within the transaction are made but nothing happens on the profiler on the databse server.

btw I am using the slxconnectionstring as is..Looks like somethings getting lost on the provider server..I am not sure how do i track it!..Any ideas?

December 15, 2011 11:25 AM

Ryan Farley said:

What I would do is take Sublogix out of the picture and just write the code to do the transactions. Once that is working, adding Sublogix in should be no issue. If there's problems caused by Sublogix we could look at adding in the necessary code once you've identified that it works without it.

December 15, 2011 5:47 PM

Kannan Srinivasan said:

Ryan, Have you had a chance to implement Sub Logix to Sage CRM ?

August 13, 2012 7:17 AM

Leave a Comment

All contents Copyright © 2015 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register