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)

This general format works well in most cases. However for some objects lowercase is used and in other examples such as participants both singular and plural forms are used, e.g. Participant_fld_GuestName and Participants_fld_AddedByID.

However references to the constituent system id are perhaps the most inconsistent. Here are a selection:

Top Level Objects
Constituents: ID
Gifts: Constit_ID
Actions: RECORDS_ID
Education rel RECORD_ID
Financial rel CONSTIT_ID
Individual rel CONSTIT_ID
Membership Constit_ID
Organization rel CONSTIT_ID
Participants RecordsID

Non top level
Alias RECORDS_ID
Address CONSTIT_ID
Constituent Code CONSTIT_ID
Solicit Codes RECORDSID
Tribute RECORDS_ID
Volunteer RECORD_ID

That gives six different ways to reference the constituent system id:

Constit_ID
RECORDS_ID
RECORD_ID
CONSTIT_ID
RecordsID
RECORDSID

Most of the time this is solved by “intellisense” in Visual Studio. The dropdown shows you what is available and you just pick the most suitable value. This doesn’t always help. Just look at what is available for individual relationship in the CIndividual object:

INDIVIDUAL2_fld_ID
INDIVIDUAL2_fld_CONSTIT_ID
INDIVIDUAL2_fld_CONSTITUENT_ID
INDIVIDUAL2_fld_RECIPROCAL_ID
INDIVIDUAL2_fld_RELATION_ID

Its not always so obvious!

2 thoughts on “Six ways to name a record

  1. …and so? how to do you determine which of those is the appropriate choice…to what do you refer? for example, the difference between
    INDIVIDUAL2_fld_CONSTIT_ID and
    INDIVIDUAL2_fld_CONSTITUENT_ID?

  2. Glad that you asked!

    As an example, John is a consituent and also a relationship on Tony’s relationship tab

    INDIVIDUAL2_fld_ID – This is John’s relationship system id
    INDIVIDUAL2_fld_CONSTIT_ID – This is Tony’s constituent system id
    INDIVIDUAL2_fld_CONSTITUENT_ID – If John is a constituent then this is the constituent id
    INDIVIDUAL2_fld_RECIPROCAL_ID – If Tony is on John’s relationship tab as a reciprocal then this is his relationship system id.
    INDIVIDUAL2_fld_RELATION_ID – This is the system id of John’s constituent record

    David

Comments are closed.