function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Whitney Klein 10Whitney Klein 10 

Payment Date Trigger

Hello, 

I have a payment object (called transaction) that is a custom object related to the opportunity object. We use and app called Chargent to process CC's in salesforce which automatically create the transaction. I have a formula on the transaction level that puts in the payment date. I would like to take this payment date from the transaction to the opportunity. I tried workflows and I couldn't access transaction fields from the opportunity. I'm hopping a trigger can copy the date from the transaction to a field in the opportunity. Any help is greatly appreciated!!!! (I have zero experience with apex and triggers)
Terence_ChiuTerence_Chiu
How is the custom object related to the Opportunity ? Master-Detail where Opportunity is the master object and Transaction is the child ? Is there a lookup field on the Transaction object to the Opportunity object ? Or is there a lookup to the transaction object from the Opportunity object ?
Whitney Klein 10Whitney Klein 10
There is a lookup on the transaction to the opportunity
 
Terence_ChiuTerence_Chiu
You can see use a Process Builder flow against the Transaction object to check if the Payment Date is modified to run an Update action to the related Opportunity and update a corresponding payment date field.
Whitney Klein 10Whitney Klein 10
I already have a process flow on the transaction object and opportunity object so I can't do that. I believe I can only have one flow per object at a time.