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
Sujitha Vedagiri 1Sujitha Vedagiri 1 

On Opportunity whem an trying to change the stage from prospecting to qualification. it should throw an error based on the condition..if type is new customer ,then the amount show be grater than 100.how can we achieve through validation rule

On Opportunity whem an trying to change the stage from  prospecting to qualification. it should throw an error based on the condition..if type is new customer ,then the amount show be grater than 100.how can we achieve through validation rule
AnudeepAnudeep (Salesforce Developers) 

Hi Sujitha, 

You can try using ISCHANGED( StageName ) in your formula field to achieve this. I recommend taking a look at Sample Opportunity Management Validation Rules for examples

Let me know if this helps. If it does, please mark this answer as Best. It may help others in the community. Thank You!

Sujitha Vedagiri 1Sujitha Vedagiri 1
AND( ISCHANGED( StageName ),ISPICKVAL( StageName , 'Prospecting'),
ISCHANGED( StageName ),ISPICKVAL( StageName , 'Qualification'),
ISPICKVAL( Type , 'New Customer'),
Amount > 100,
ISPICKVAL( Type , 'Existing Customer - Upgrade'),
Amount > 500,
ISPICKVAL( Type , 'Existing Customer - Downgrade'),
Amount < 1000)
Sujitha Vedagiri 1Sujitha Vedagiri 1
i have done it in this way but its not firing the error
AND( ISCHANGED( StageName ),ISPICKVAL( StageName , 'Prospecting'),
ISCHANGED( StageName ),ISPICKVAL( StageName , 'Qualification'),
ISPICKVAL( Type , 'New Customer'),
Amount > 100,
ISPICKVAL( Type , 'Existing Customer - Upgrade'),
Amount > 500,
ISPICKVAL( Type , 'Existing Customer - Downgrade'),
Amount < 1000)
73 Srinivas73 Srinivas
AND( $Profile.Name = "Custom: Sales Profile",
ISCHANGED( StageName ), TEXT( PRIORVALUE( StageName ) ) = "Prospecting",
ISPICKVAL( StageName , "Qualification"),
OR( AND( ISPICKVAL( Type , "New Customer"), Amount < 100),
AND( ISPICKVAL( Type , "Existing Customer - Upgrade"), Amount < 500),
AND( ISPICKVAL( Type , "Existing Customer - Downgrade"), Amount > 1000),
AND( NOT ( ISPICKVAL( Type , "New Customer")),
NOT ( ISPICKVAL( Type , "Existing Customer - Upgrade")),NOT ( ISPICKVAL( Type , "Existing Customer - Downgrade")))))