RE-Decoded

A technical look at the Raiser's Edge API from Blackbaud


Feeds:

Raiser’s Edge Integration with REST webservice

January 5th, 2012 by David Zeidman

I have been working on a new version of RETweet which will be released soon. In that version we are allowing users to create constituents from Twitter users. The amount of information that you get from Twitter about the Tweet and the person that tweeted is very limited. The real name of the Twitter user – and it is not always a real name – is given in one field so it could include the first and last name (this is the most common where it is not a Tweeting business).  To make this more useful the application reaches out to a webservice to determine the gender of the person.

The webservice takes the first name and returns gender information and which countries the name appears in. The web service is biased towards European and Western first names but does claim to cover some countries in Asia too.

This could also easily be integrated as a VBA solution so that when you save and close a constituent record, if the gender is unknown the VBA code reaches out to the webservice and populates the code. Here is some sample code that shows you how this is done. This is done using .NET as it is considerably easier to achieve than in the native VBA environment. It would, however, be easy to make a call to a COM visible assembly from the native VBA client to call this method.

 

' Determines the gender of the person by looking up useing Thomas Bayer's webservice.
Private Sub SetGender(firstName As String, constit as CRecord) 

   Dim xdoc As XDocument
   Try
      'Here we retrieve the XML document from the REST web service
      xdoc = sendXML("http://www.thomas-bayer.com/restnames/name.groovy?name=" & firstName)

      Dim result = xdoc.<restnames>

      'if there is an error then the gender cannot be found
      If result.Descendants("error").Count > 0 Then
         Return
      End If

      'This is not an ideal check as a name can be both male and female
      'but for simplicity we assume this is not the case
      If resultresult.<nameinfo>.<male>.FirstOrDefault.Value.ToLower = "true" Then
         constit.Fields(ERECORDSFields.RECORDS_fld_GENDER) = "male"
      Else
         constit.Fields(ERECORDSFields.RECORDS_fld_GENDER) = "female"
      End If
      Catch
         'If there is an error due to the web service we catch it here and don't bother the end user.
      End Try

End Sub

Private Function sendXML(ByVal uri As String) As XDocument

   Dim request As HttpWebRequest
   Dim response As HttpWebResponse
   Dim reader As XmlReader

   request = HttpWebRequest.Create(uri)
   response = request.GetResponse()

   reader = XmlReader.Create(response.GetResponseStream())
   Return XDocument.Load(reader)

End Function

 

Look out for our new version of RETweet. It will include this and a lot of other new features!

Posted in Intermediate | No Comments »

A .NET Fix

August 13th, 2011 by David Zeidman

This post is totally unrelated to The Raiser’s Edge and the API but in case others are having the same issue I wanted to describe how I fixed it. I have just spent the last several hours trying to get the progress bar to scroll in the marquee style. I had seen several posts referring to using a background worker to retrieve data from the database while the progress bar scrolled in the UI thread. It sounded like the right solution but it didn’t make a difference.

I read one post that helped. It said that before you instantiate your form you need to enable the visual styles.

Application.EnableVisualStyles()

When I ran my application all of a sudden not only was my progress bar scrolling nicely but all of a sudden I could see the graphical styles that I always had seen in Visual Studio but never experienced in my Winform applications.

Posted in Intermediate | No Comments »

Customizations, SDKs and API’s, Oh RE

May 26th, 2011 by David Zeidman

If you recognise the title of this post then I was inspired by a BlackbaudKnowHow article of a similar name. In that article the author describes the differences between the three terms and how they relate to Blackbaud Enterprise CRM. This is a good overview and works well for Blackbaud Enterprise CRM. However it breaks down when talking about The Raiser’s Edge 7.

Read the rest of this entry »

Posted in Not Code | No Comments »

Bank Checking Software Compared

May 19th, 2011 by David Zeidman

I have been working with different bank checking software. Blackbaud Europe have written a plug-in for The Raiser’s Edge to update the bank record data such as the name and branch of the bank as well as the address based on the sort code. We recently developed a plug-in that processed the direct debit returns and unpaids from BACS and update the recurring gifts accordingly. In some cases a new bank would need to be created. I was asked to integrate the plug-in with their Blackbaud written plug-in.

Read the rest of this entry »

Posted in Not Code | No Comments »

Subtle changes in Visual Studio 2010 make Raiser’s Edge API less typing

December 8th, 2010 by David Zeidman

I have been using Visual Studio 2010 for a short while now ever since the prospect of developing workflows for Enterprise CRM became a reality. One thing that I noticed when working with The Raiser’s Edge API however is that it is much faster to type out everything.

Read the rest of this entry »

Posted in Beginner | No Comments »

A Raiser’s Edge C# Plugin

November 4th, 2010 by David Zeidman

A few days ago I put a question on both Blackbus and the official Blackbaud forums asking if anybody had written a plug-in in C#. I have written a number of customisations in C# (VB.NET is my most common programming language – although I do enjoy using C#) but I had never written a plug-in before. It has always been a web service of application of some kind. I managed to work out how to do it and thought that I would share my solution here. Read the rest of this entry »

Posted in Advanced | 7 Comments »

C# API Try Catch Finally Snippet

October 6th, 2009 by David Zeidman

I have been doing some work with C# recently and  decided that despite what people say C# is as equally verbose as VB.NET. It is true if you look at the number of characters in a VB program compared to the equivalent C# program there will be a greater number but you seem to get a lot more automatic inserts with VB than you do with C#. C# seems to have a lot more punctuation that VB too adding up to a lot more typing than I was used to.

Read the rest of this entry »

Posted in Intermediate | No Comments »

The Raiser’s Edge API: VB.NET versus C#

July 21st, 2009 by David Zeidman

I am sure that there are a many people out there who still use VB6 when working with The Raiser’s Edge API but it is more and more common that you need to write .NET code and indeed want to write .NET code. There are several reasons for this but for me it is simply that the Visual Studio 2008 is a thousand time better than the VB6 development environment. I cringe every time I have to go back to a piece of old code or to the VBA environment. What really interests me is the choice of VB.NET or C# for development.

Read the rest of this entry »

Posted in Advanced | 9 Comments »

The Case of the Missing Tabs

July 25th, 2008 by David Zeidman

Here is a strange problem that I encountered. I wanted to show the constituent form with constituent data. I also wanted to know if the user had saved and closed or just closed the form afterwards. If I had not been interested in knowing this information then I would have simply done the following: Read the rest of this entry »

Posted in Intermediate | No Comments »

Fund Missing (Found in an Unexpected Place)

December 21st, 2007 by David Zeidman

I had an error that bugged me for a while when I could not work out what the problem was.

I had a list of gifts that I wanted to create on different constituents. I had the constituent id, the date, amount, fund, appeal, campaign, everything that I thought was required.

I got the following error message when trying to save the newly created gift:

Required Field Missing: Fund

Read the rest of this entry »

Posted in Intermediate | 2 Comments »

« Previous Entries

Switch to our mobile site