Skip to content

Creating Custom Salesforce Fields

VIDEO TRANSCRIPT | Recorded: 2025-10-30 | Verify against current system state

Abstract

Training session demonstrating creation of custom lookup fields on the Order object in Salesforce. Creates two fields: historical_related_order (for linking historical refunds from Aptify migration) and calculated_related_order (intended to simplify RightRev reporting by choosing between historical and native related order IDs). Develops a record-triggered flow with decision tree logic and fast field updates. During testing, discovers that orders cannot be modified after refund processing, making the calculated field approach unworkable. Deletes the calculated field and flow, keeping only historical_related_order.

Key Procedures

  • Navigate to Object Manager > Order > Fields & Relationships
  • Create lookup field to Order object for self-referential relationship
  • Set field-level security: read access for all, edit only for IT Support
  • Configure related list display name (e.g., "Refunded Orders Historical")
  • Create record-triggered flow with fast field update (before save)
  • Set entry conditions: when related_order_id OR historical_related_order is changed
  • Use decision tree element instead of formula for lookup field values
  • Debug flow using built-in debugger with skip condition requirements
  • Test by manually setting field values on orders in staging
  • Document changes for BitBucket repository metadata

Notable Statements

  • 0:00:54 "So we're going to create two lookup fields."
  • 0:03:07 "Anybody can have read access. But really only the IT support group should have edit access."
  • 0:05:09 "We're going to just create one and it's going to be populated on a flow to be either the historical related order ID or the related order ID, depending on which one's populated."
  • 0:11:11 "Fast field updates happen before the record saved. So it's faster."
  • 0:21:22 "Let's try it a different way. So I have to do a decision tree."
  • 0:27:50 "This is pretty cool actually." (regarding flow debugger visualization)
  • 0:38:36 "Calculated related order got set, but... These both got blanked out."
  • 0:39:02 "So my flow is useless."
  • 0:44:08 "I'm not going to be able to do this calculated field that was going to help."
  • 0:45:37 "We're just down to that historical related order ID. We're not doing a flow. So we just added one new field."

Systems & Configurations

Systems Mentioned

  • Salesforce (Object Manager, Flows, Field Security)
  • BitBucket (metadata repository)
  • RightRev (revenue recognition, motivation for field)

Specific Configurations

Item Value/Setting Timestamp Notes
Field 1 historical_related_order 0:01:49 Lookup to Order
Field 2 calculated_related_order 0:06:02 Later deleted
Edit Access IT Support only 0:03:14 Field-level security
Flow Type Record-Triggered (Fast) 0:10:42 Before save
Flow Name AANP Update Calculated Related Order 0:26:05 Naming convention
Related List Refunded Orders Historical 0:04:07 Display name

Credentials/Access Mentioned

  • Salesforce Object Manager access
  • IT Support profile for edit access
  • BitBucket repository access for metadata

Errors & Troubleshooting

  • Issue: Cannot use formula field for lookup relationship
  • Cause: Lookup fields require actual relationship, not formula
  • Resolution: Create flow with decision tree logic instead
  • Timestamp: 0:05:24

  • Issue: Formula syntax errors in flow

  • Cause: Attempting IF/ISCHANGED/ISBLANK in flow formula
  • Resolution: Switch to decision tree element
  • Timestamp: 0:19:05

  • Issue: Calculated field not populating after refund

  • Cause: Orders locked after refund processing; wizard clears custom fields
  • Resolution: Abandon calculated field approach, use only historical_related_order
  • Timestamp: 0:38:36

  • Issue: Cannot modify order after activated/refunded

  • Cause: Salesforce order lifecycle restrictions
  • Resolution: Accept limitation; historical orders won't be true refunds anyway
  • Timestamp: 0:40:07

Transcript Gaps & Quality Notes

  • Training session with Matt (Speaker 3) and others
  • Live debugging and problem-solving session
  • Significant time spent discovering limitations of approach
  • Final solution simplified to single field without flow
  • Changes made in staging require BitBucket metadata tracking
  • Testing refund process failed due to unrelated Chargent issues