Skip to main content

Want to create a formula on a specific Opportunity record type, 

 

Validation rule needs to prevent the Fund field from being updated to a fund that has a status of Liquidated or Liquidating. 

 

Can you please assist? 

Details below: 

 

Record Type ID= 01220000000AOdBAAW 

Fund = Fund__c (this is a lookup field) 

Fund Status= Fund_Status__c (this is a formula field) 

 

#Formulas

3 Antworten
  1. Gestern 14:28

    @Alex Valavanis

      

    Because the status lives on the Fund record, reach it cross-object — a lookup lets you reference the parent's fields with the __r syntax, so Fund__r.Fund_Status__c works even though it's a formula field. Put this on the Opportunity validation rule (it fires / blocks the save when TRUE): AND( RecordTypeId = "01220000000AOdBAAW", OR(ISNEW(), ISCHANGED(Fund__c)), OR(Fund__r.Fund_Status__c = "Liquidated", Fund__r.Fund_Status__c = "Liquidating") ). The OR(ISNEW(), ISCHANGED(Fund__c)) limits it to when the Fund is actually being set or changed, so records that already point to a fund aren't locked if that fund later goes into liquidation. Two tips: match the exact text your Fund_Status formula outputs (the comparison is case-sensitive), and consider RecordType.DeveloperName = "Your_RT_API_Name" instead of the hardcoded Id so it survives sandbox refreshes and deploys. if this helps, please mark it as the Best Answer so it helps the next person — thanks 🙂

0/9000