 ShowAll Questionssorted byDate Posted makapoor

# Validation rule: revenue and close date fields

Can someone help me troubleshoot this formula - there seems to be no syntax errors but it does not work.

AND(
OR(
Probability = 0.50,
Probability = 0.75,
Probability = 0.90),
MONTH (CloseDate) =10,
MONTH (CloseDate) =11,
MONTH (CloseDate) =12,
YEAR (CloseDate) = YEAR(TODAY()),
ISBLANK( Carry_forward_revenue__c ))

Note: carry_forward_revenue__c is a custom field. And the logic is as follows:

If an opportunity is at 50%, 75% or 90% and the close date falls in Oct 2009, Nov 2009 or Dec 2009 (Q4 2009), the user must input carry forward revenue before saving the opportunity.

Need a solution by end of day today. Best Answer chosen by Admin (Salesforce Developers)  Steve :-/
Try this one

AND(
OR(
Carry_Over_Revenue__c <= 0,
ISBLANK(Carry_Over_Revenue__c)),
Probability >= 0.50,
MONTH (CloseDate) >=10,
YEAR (CloseDate) = YEAR(TODAY())) Steve :-/
Try this one

AND(
OR(
Carry_Over_Revenue__c <= 0,
ISBLANK(Carry_Over_Revenue__c)),
Probability >= 0.50,
MONTH (CloseDate) >=10,
YEAR (CloseDate) = YEAR(TODAY()))

This was selected as the best answer makapoor

Thanks, it works.

This one is giving trouble too.

(Carry_forward_revenue__c+CY_Q1_revenue__c+CY_Q2_revenue__c+CY_Q3_revenue__c+CY_Q4_revenue__c) <> Amount

Error: Revenue split must be equal to Opportunity amount. Steve :-/
Your formula is okay, you just have to add field validation so there are no NULLS, either at the field level or in your formula. makapoor
Ok, thanks.