Loading
Salesforce Enforces New Security Requirements in Summer 2026Read More

Salesforce Loyalty Management: Decision table formula error when adding timezone offset to ActivityDate

Publish Date: Jul 14, 2026
Description

In Salesforce Loyalty Management, adding a timezone offset calculation to a date input on an adjustment decision table can cause the Loyalty Program Process to fail.

The decision table stops working after adding a formula such as {!TransactionJournal.ActivityDate} + (8/24) to shift a DateTime by 8 hours for local time. The failure surfaces as the error "Cannot invoke "com.force.formula.ContextualFormulaFieldInfo.getFieldOrColumnInfo()" because "ffi" is null". A related symptom is that the decision table returns incorrect data even when it does not error. The root cause is a data type mismatch: TransactionJournal.ActivityDate is a DateTime value stored in UTC (for example 2026-06-24T16:01:00.000+0000). Adding (8/24) produces a DateTime such as 2026-06-25T00:01:00.000+0000. When that DateTime is passed into a decision table column that is a Date field (such as Start_Date__c or End_Date__c), Salesforce truncates the time component and compares only the date portion. The truncated value evaluates against the underlying UTC date (2026-06-24) rather than the intended local date (2026-06-25), so the wrong decision table row is matched or the formula context is lost and the process fails. This occurs when a DateTime-typed formula result feeds a Date-typed decision table input.

Resolution

The reliable fix is to move the timezone conversion to a custom formula field on the TransactionJournal object, evaluated at record-save time by the full Salesforce formula engine.

Step 1 — Create a custom formula Date field on TransactionJournal

Go to Setup → Object Manager → Transaction Journal → Fields & Relationships → New
Select Formula as the field type, output type Date
Name the field, e.g., Local_Activity_Date__c
Enter the formula:DATEVALUE(ActivityDate + (8/24))(Adjust the offset 8/24 to match your program's timezone — e.g., 5.5/24 for IST GMT+5:30)
Save the field

Step 2 — Update the Loyalty Program Process stepOpen the Loyalty Program Process in Loyalty Program Setup
Navigate to the step that references the Adjustment Decision Table
In the Input Column Mapping, replace the inline formula with a reference to the new field:{!TransactionJournal.Local_Activity_Date__c}
Save the LPP step


Step 3 — Verify decision table column typesConfirm that the receiving columns (Start_Date__c, End_Date__c, or equivalent) are of type Date — this is expected and correct now that the input is also a proper Date value.


Why Not an Inline Formula in the Decision Table?

Editing the inline formula directly in the decision table input mapping (e.g., DATEVALUE({!TransactionJournal.ActivityDate} + (8/24))) is not reliable because:


CONVERTIMEZONE() is unsupported in LPP inline formulas
The LPP formula engine evaluates at runtime with restrictions that the standard formula field engine does not have
A custom formula field on TransactionJournal is evaluated at record-save time by the full formula engine, guaranteeing the correct local date is stored and available

Verification
Use a TransactionJournal record whose ActivityDate is close to midnight UTC — for example:2026-06-24T16:01:00.000+0000(for a GMT+8 program, this is 2026-06-25 00:01 local)
Run the Loyalty Program Process and confirm:
No ffi is null error
The decision table matches the row for the local date (2026-06-25), not the UTC date (2026-06-24)

Additional Notes
The timezone offset in the formula (8/24) must be adjusted per program. It is a static offset and does not account for Daylight Saving Time. For programs in DST-affected regions, consider a separate approach.
If the decision table editor throws validation errors while typing a formula inline, build the full formula in a plain text editor first, then paste it in.

Knowledge Article Number

005388952

 
Loading
Salesforce Help | Article