When you open up a constituent record wouldn’t it be good to see a one line overview of the most important distinguishing features of their record even if they are on different tabs? This tip shows you how to put this information into the window dialogue title.
This was used when I was at Jewish Community Federation of San Francisco. The idea is that you set up the user options to show a specific addressee or salutation in the title window. Normally this is populated by the constituent’s name or their regular primary salutation. Instead you need to select a custom defined salutation. The custom defined salutation is then created on
The following code is written in the VBA environment and should be placed in the RE_System_Object_Code using the Constituent_BeforeSave and/or Constituent_BeforeOpen functions
Dim oConstit As CRecord
Set oConstit = oRecord
Dim oSal As CConstituentSalutation
Dim bFound As Boolean
Dim sMySal As String
sMySal = getMySal(oConstit)
For Each oSal In oConstit.Salutations
If UCase(Trim(oSal.Fields(CONSTITUENT_SALUTATION_fld_SAL_TYPE))) = "MYCUSTOMSAL" Then
bFound = True
If oSal.Fields(CONSTITUENT_SALUTATION_fld_SALUTATION) <> sMySal Then
oSal.Fields(CONSTITUENT_SALUTATION_fld_EDITABLE) = True
oSal.Fields(CONSTITUENT_SALUTATION_fld_SALUTATION) = sMySal
If bFound = False Then
.Fields(CONSTITUENT_SALUTATION_fld_EDITABLE) = True
.Fields(CONSTITUENT_SALUTATION_fld_SAL_TYPE) = "MyCustomSal"
.Fields(CONSTITUENT_SALUTATION_fld_SALUTATION) = sMySal
.Fields(CONSTITUENT_SALUTATION_fld_SALUTATION_ID) = 1
Even though we have customised the salutation we still have to give it an id as otherwise it will not save. The "1" is an arbitrary value.
The method getMySal can be used to return a string based on whatever characteristics you find useful. You will probably want their name and and maybe the constituent id. You may want to add an attribute or two, their constituent code or even when they were last modified and by whom.
Once that is done you need to set up the user options to use this new addsal in the window as shown below.