Tag Archives: Constituent

C++ and the API

I am not sure how many people out there would even dream of using C++ together with the API but considering there really is no documentation out there for this type of project I thought that I would try to put together some notes on how it is possible. The API is COM based and there is no reason why you cannot use C++ (just possibly more of a question of why you would ever want to). This posting assumes a basic knowledge of C++.

Firstly why would you every want to use C++. Sometimes this is a necessity. You may be using old C or C++ legacy code that you want to integrate directly with the API. In which case here are a few tips to get you started.
Continue reading C++ and the API

Close down or crash

One of the basic principles that you need to learn when you start programming the API is that for top level object (constituents, gifts, funds, participants, etc) whenever you initialize the object you need to close it down. This is not too difficult to remember to do and you are swiftly reminded when you close the plug-in or the application (it crashes).

However there are some exceptions to this. When you loop a collection of top level records e.g. CGifts, using the for each construct you also have to close down the individual item. This goes against the above logic as you did not initialize it.
Continue reading Close down or crash

Filtering on Gifts

One common complaint about the API is that it is poorly documented. I found that out myself when I went to use the gift filter object. This is a powerful object that allows you to filter a collection of gifts by its properties. The filter object has very many properties but very few of them are documented. There is one knowledgebase article and one FAQ entry showing how to use it.
Continue reading Filtering on Gifts

The case of the disappearing form

One of my most long standing problems that I have had with RE:VBA is showing a form modally. This in itself is not difficult but as soon as you move away from Raiser’s Edge, bring up another window in front of the modal form and then go back to Raiser’s Edge, the modal form has disappeared. Because the form is modal you are not able to access the underlying window (let’s call this the parent window). This is a pain as the only way to bring it back is to place another window over the parent window and then minimize it. This is not hard to do but it is harder to explain to users and not very intuitive.

Continue reading The case of the disappearing form

Old and New Relationships

The other day I was trawling the knowledgebase for some code to quickly look up the primary organization record for a constituent. It is the sort of thing that I could have worked out myself very easily but sometimes it is just convenient to see if Blackbaud already have the code available.

I found exactly what I was looking for, or so I thought. KB BB54132: How to write code to find the Record ID for the Primary Organization relationship. Seeing the solution reminded me of the time I first took over the reigns of RE customisation developer at my first position in San Francisco.

Continue reading Old and New Relationships

Six ways to name a record

One thing that can make the API confusing is its inconsistencies. Take for example the task of referencing the constituent object’s system id from another data object. The constituent system ID is used uniformally throughout to connect a constituent to its child objects such as, gifts, actions, aliases, solicit codes, etc. The naming convention however is not uniform. The objects have fields which are referenced in the following format:

OBJECTNAME_fld_FIELDNAME

so that an action references the constituent that is tied to it by the following:

oAction.Fields(ACTION_fld_RECORDS_ID)

Continue reading Six ways to name a record

Shortcuts with Long Names

Every so often you discover something useful from the vault of information that is the API/VBA help file. The help file is a reference guide for the whole API but in order to really make use of it you have to study the various classes carefully. This is generally not something I enjoy doing.

I stumbled across a useful solution to a problem that could easily have been solved another way. I had been manipulating address objects (CConstitAddress) but did not have the name and constituent id of the constituent that the address referred to. Continue reading Shortcuts with Long Names

Decoding RE code

Welcome to RE Decoded. My aim with this blog is to share some techniques used in the Raiser’s Edge API to solve day to day problems that the ordinary user may have. Feel free to add your own comments if you have solved a problem differently. Its the best way to learn.

This first entry is less technical than the other entries. I need to break you in gently.

Continue reading Decoding RE code