+ Start a Discussion
Shannon Andreas 1Shannon Andreas 1 

Need to prevent cross-object formula field from changing

Hello!

I need some assistance.

I have created a formula that will input a date value from an opportunity record (CloseDate) into a custom field on the Contract record (Opportunity_Close_Date__c). The formula is Opportunity_Name__r.CloseDate on the contract record field.

The problem is that if the opportunity close date is changed on the Opporunity, it changes on the contract record. I am wondering if there is a way to record the value only as static text on the contract record? I don't want the value to change once it has been input into the contract.

Thanks!
Best Answer chosen by Shannon Andreas 1
Kevin Malek 16Kevin Malek 16

I agree with SwayamChouksey. Create a date or text field on the Contract record and use either a field update or the process builder to populate when the record is created or edited and didn't previously meet the filter criteria.

If a formula field is really the solution you want, there may be a process you can enforce with a validation rule that once a contract is created against the opportunity that the closed date cannot be further edited.  Best practice would dictate a workflow rule though.

 

All Answers

Swayam@SalesforceGuySwayam@SalesforceGuy
Hi,

You cannot use fromula field  for making it static, create a workflow rule, update the field based on condition one time..

--
Thanks,
Swayam
@salesforceguy
Kevin Malek 16Kevin Malek 16

I agree with SwayamChouksey. Create a date or text field on the Contract record and use either a field update or the process builder to populate when the record is created or edited and didn't previously meet the filter criteria.

If a formula field is really the solution you want, there may be a process you can enforce with a validation rule that once a contract is created against the opportunity that the closed date cannot be further edited.  Best practice would dictate a workflow rule though.

 
This was selected as the best answer
Shannon Andreas 1Shannon Andreas 1
There is another way as well. The contract is created from a trigger, I could probably just add these fields to that as well. Just didn't want to mess with the code again.

Thanks guys!!!

Shannon