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
Sourav PSourav P 

How to calculate the latest date from a related object, if new record values get created?

Hi,
I have Contract object, and Payments as the related onject on it. In Payment, i have the amount and the paid dates. New records keep getting on in this once a payment been made.
I want that in contract , i have a field " latest paid" where only the latest paid amount will get reflected. May i know how to do this.
I tried creating a PB in Payment object, with criteria as when status is Paid, But in action i am not able to know how to goahead with the formula as i am not comparing with any  date fields, can anybody suggest plz.
Best Answer chosen by Sourav P
VamsiVamsi
Hi Sourav,

You can get this done using a process builder. Please setup a process builder on payments object with criteria - when a new record is created.

Next select field update action on Contract object followed by selecting the field where you want to update and in formula just place the paid_date__c field (Please make sure that correct API names are used for fields )

 

All Answers

VamsiVamsi
Hi Sourav,

You can get this done using a process builder. Please setup a process builder on payments object with criteria - when a new record is created.

Next select field update action on Contract object followed by selecting the field where you want to update and in formula just place the paid_date__c field (Please make sure that correct API names are used for fields )

 
This was selected as the best answer
Sourav PSourav P
Hi Vamsl, Thanks . It worked .
VamsiVamsi
Glad to help ...!!!