For those who have worked with RightNow Connect Data Integration you know the version of your client side libraries must match the version of your server. This presents a problem if your integration needs to work with a number of different RightNow sites. You either have to insist that all sites you interact with are of the same version, repackage your application for every site version you are going to support and include the right version of the data integration libraries or use reflection and not couple your code to the data integration libraries. The first two options are not very viable but the reflection approach is very viable. Taking this approach you can create an integration that dynamically loads the correct version of the client side libraries (at run time) to match the version of the RightNow site your integration is going to utilize.
Today I created a sample application that uses reflection to dynamically load the RightNowConnect assembly at run time and invoke all methods using reflection. Truth be told this was the first time I ever wrote code using reflection and I actually found it very straightforward. I utilized a couple Google searches to get started but in the end I primarily used MSDN to find all the information I needed. The primary classes I utilized where Assembly, Object, Type, MethodInfo and PropertyInfo. In the sample I create a new contact and populate the first and last name fields. I then send the create command to the server. Finally, I retrieve the contact I just created through the ‘get’ operation and print the contacts first and last name to the console.
The other tip I’d offer to those looking to write an integration using reflection is to first develop the code without reflection. This helps you know what objects / methods you will need to work with and the structure of the method signatures. In my sample application I left this code in my application, commented out of course.
You can download the sample application on our developer forums.

I think it should be noted that there are potential risks associated with late-binding assemblies. The major one is that when you create an instance of a particular type, you have to do so by name. Because of this, if the name were to change- then the code could potentially break, and the functionality would definitely be lost.
People do need to understand and accept this risk when applying this method. I would strongly recommend that anyone who uses this method put in solid tracing/logging and lots of error condition handling. Always check for null references after calling Activator for a particular type and before invoking a method on it.
(Note that Chris’s example code does not show error handling, and rightly so as it is simply example code.)
(Also note that because we are talking about RightNow’s public API- the chance of these Type names and type field names changing is most likely a very small one…)
Willy,
Thank you very much for you feedback. I agree with your comments on error checking and potential for problems if the functions or properties change.
In regards to your last note, RightNow Connect Data Integration does have a two year backward compatibility guarantee meaning we will not change any of our methods or properties for at least two years and often longer!
Thanks again for your feedback!
gives utilize a fantastic web page decent Gives with thanks for the effort to help out myself
gives utilize a excellent webpage decent Gives appreciate it for the work to assist me
You can definitely see your skills in the paintings you write. The arena hopes for more passionate writers like you who aren’t afraid to mention how they believe. Always go after your heart.