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
Danielle Rosen 8Danielle Rosen 8 

Validation Logic Help

Hi there, I'm not sure what's wrong with my logic here:

AND ( ISPICKVAL(A_la_carte__c, "")
)
OR (
ISPICKVAL( Opportunity_Type__c, "Video Ad Server"),  
ISPICKVAL( Opportunity_Type__c, "VAD Renewal"),
ISPICKVAL( Opportunity_Type__c, "Amendment"),
) )

I'm trying to say, if the opportunity type selected is any of the above, and a value is not selected in the drop down 'A_la_carte__c' then show validation rule. I'm getting the synax error "Extra OR." Thanks in advance for your help.
Best Answer chosen by Danielle Rosen 8
Khan AnasKhan Anas (Salesforce Developers) 
Hi Danielle,

Greetings to you!

Please try below validation rule:
AND (
   ISPICKVAL(A_la_carte__c, ""),
   OR (
      ISPICKVAL( Opportunity_Type__c, "Video Ad Server"),  
      ISPICKVAL( Opportunity_Type__c, "VAD Renewal"),
      ISPICKVAL( Opportunity_Type__c, "Amendment")
   ) 
)

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Danielle,

Greetings to you!

Please try below validation rule:
AND (
   ISPICKVAL(A_la_carte__c, ""),
   OR (
      ISPICKVAL( Opportunity_Type__c, "Video Ad Server"),  
      ISPICKVAL( Opportunity_Type__c, "VAD Renewal"),
      ISPICKVAL( Opportunity_Type__c, "Amendment")
   ) 
)

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
This was selected as the best answer
Danielle Rosen 8Danielle Rosen 8
Thank you!
Deepali KulshresthaDeepali Kulshrestha
Hi Danielle,
Greetings to you!

- Please use the below validation rule : -

    AND (
        ISPICKVAL(A_la_carte__c, ""),
        OR (
        ISPICKVAL( Opportunity_Type__c, "Video Ad Server"),  
        ISPICKVAL( Opportunity_Type__c, "VAD Renewal"),
        ISPICKVAL( Opportunity_Type__c, "Amendment"),
        ) 
    )
    
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com