Refund fields supported by Custom Logic
This reference lists the fields of the Refund object that are supported by the Custom Logic feature.
For more information about conditions and mutations in custom logic, see Objects and fields supported by Custom Logic.
| Field name | Field type | Supported for condition | Supported for mutation |
|---|---|---|---|
AccountId | String | Yes | No |
AccountingCode | String | Yes | No |
Amount | Decimal | Yes | No |
BankAccountAccountingCode | String | Yes | No |
BankAccountAccountingCodeType | String | Yes | No |
CancelledOn | DateTime | Yes | No |
Comment | String | Yes | No |
CreatedById | String | No | No |
CreatedDate | DateTime | Yes | No |
Gateway | String | Yes | No |
GatewayResponse | String | Yes | No |
GatewayResponseCode | String | Yes | No |
GatewayState | String | Yes | No |
Id | String | No | No |
MarkedForSubmissionOn | DateTime | Yes | No |
MethodType | String | Yes | No |
PaymentId | String | Yes | No |
PaymentMethodId | String | Yes | No |
PaymentMethodSnapshotId | String | Yes | No |
ReasonCode | String | Yes | No |
ReferenceId | String | Yes | No |
RefundDate | Date | Yes | No |
RefundNumber | String | Yes | No |
RefundTransactionTime | DateTime | Yes | No |
SecondRefundReferenceId | String | Yes | No |
SettledOn | DateTime | Yes | No |
SoftDescriptor | String | Yes | No |
SoftDescriptorPhone | String | Yes | No |
SourceType | String | Yes | No |
Status | String | Yes | No |
SubmittedOn | DateTime | Yes | No |
TransferredToAccounting | String | Yes | No |
Type | String | Yes | No |
UnappliedPaymentAccountingCode | String | Yes | No |
UnappliedPaymentAccountingCodeType | String | Yes | No |
UpdatedById | String | No | No |
UpdatedDate | DateTime | Yes | No |
Payment related object
The Refund Custom Logic payload includes the related Payment object when the refund is linked to a payment. Custom Logic scripts can read fields from the related Payment object—including standard and custom fields—using the access pattern refund.Payment.FieldName.
The Payment object is available as a condition (read-only) in the Refund Custom Logic context. Custom Logic scripts can use Payment field values to populate fields on the Refund record, but cannot write back to Payment fields through this context.
The following example reads a custom field from the related Payment and uses its value in the script logic:
// Read a custom field from the related Payment object
var paymentEntity = refund.Payment.PaymentTextCustom__c;
// Use the value to set a field on the Refund
if (paymentEntity) {
refund.RefundTextCustom__c = paymentEntity;
}
| Property | Value |
|---|---|
| Access pattern | refund.Payment.FieldName |
| Supported for condition | Yes |
| Supported for mutation | No |
| Cardinality | Many-to-one (a refund is linked to one payment) |
| Custom fields | Supported. Access custom fields using the same pattern, for example refund.Payment.CustomField__c. |