Skip to main content
Hi Experts

I need quick help in writing one validation rule on opportunity. Requirement is below:

- New, Pipeline and Forecast Record Type: Lost Reason(custom field) and Other Reason(custom field) should not be editable until the Opportunity is set to 'Closed Lost'.

- Renewals Record Type: Loss Type, Loss Reason and Other Reason should not be editable until the Opportunity is set to 'Closed Lost'.

I want these points to be covered in a single VR. Looking forward to your swift help on this.

Thanks in advance..!!
1 Antwort
  1. 3. Nov. 2020, 13:45
    OR(

          AND(

                 OR( RecordType.DeveloperName='New',

                         RecordType.DeveloperName='Forecast',

                         RecordType.DeveloperName='Pipeline'

                      ),

                 !ISPICKVAL(StageName , 'Closed Lost'),

                 OR( ISCHANGED( Lost_Reason__c),

                         ISCHANGED( Other_Reason__c)

                      )

                    ) ,

        AND( 

                  RecordType.DeveloperName='Renewals',

                  !ISPICKVAL(StageName , 'Closed Lost'),

                   OR( ISCHANGED( Lost_Reason__c),

                           ISCHANGED( Other_Reason__c),

                           ISCHANGED( Loss_Type__c )

                         )

                )

    )
0/9000