Category Archives: Beginner

A .NET plugin

When I first saw Shaun Sullivan’s code to create a .NET plugin in Raiser’s Edge I was a bit concerned. I tried out the code and after a bit of fiddling with it I managed to get it to work. Although I thought and still think that having an extra HTML page with the plugin as a user control was a bit of a hassle.

A much easier solution that I have done several times is to simply create a .NET class library with a form. When you start your plugin the form is shown directly in a new window.

Continue reading A .NET plugin

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

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

VBA: Inside or Out?

If you are using VBA to perform actions on opening, saving or deleting record you have the option of putting the code in two different places.

Perhaps the most obvious is when you log in to RE as supervisor you can go into the Visual Basic for Applications environment (found under the Tools menu) and capture your events in the System project. This is the “inside” solution as it resides inside the database and can be programed from inside the RE application.

The other option is to use the RE7VBA tool. This executable is found in the Raiser’s Edge directory along side RE7.exe. Running this program opens up a similar environment except that you can save your work in a file and compile it to a DLL. This is the “outside” solution for opposite reasons

What are the pros and cons of each? Continue reading VBA: Inside or Out?