Accessing Custom Field Values
In Scripts
The get() method retrieves a custom field value from any record that carries custom fields. It returns the custom property value object, or null if no value is set.
For most field types — use .value:
var level = contact.get('GivingLevel').value;
var glCode = fund.get('GL_CODE').value;
var dept = orderItem.get('Department').value;
For long text fields (CLOB type) — use .text:
var notes = contact.get('DetailedNotes').text;
Null-safe access:
var field = contact.get('GivingLevel');
if (field != null && field.value != '') {
// safe to use field.value
}
Integration Codes in Scripts
Integration codes are accessed via the same get() method on the parent record — the campaign, item, or payment method — not on the transaction or order item:
// GL code from the campaign (form)
var costCenter = campaign.get('CostCenter').value;
// GL code from the item
var glCode = orderItem.orderableItem.get('GL_CODE').value;
// Payment category from the payment method
var category = purchaseOrder.payment.paymentMethod.get('Category').value;
Integration codes are the bridge between DonorPoint transaction data and your external accounting or GL system.
In Reports and List Views
Custom field values appear as selectable columns in list views for the record type they are defined on. Click the column selector (gear icon) in any list view to add custom field columns.
In report queries, the wildcard expands to all custom fields for that entity:
select Contact.*, Contact.firstName, Contact.lastName
from Contact ...
Contact.* automatically includes all custom fields defined for Contacts in your account.
In Payout Exports
Fund custom fields and integration codes on campaigns and items appear in the payout Detail CSV export. This allows downstream GL posting to use DonorPoint-stored codes without manual lookup tables.
In Document Templates
Any custom field value accessible in the script context is also available as a merge tag in document templates and email content:
#{contact.get('GivingLevel').value}
#{fund.get('GL_CODE').value}