+ Start a Discussion
JPINOJPINO 

Validation Rule on opportunity products to set total price to zero (0) if checkbox is true

Hello,  I am in need of help.

 

I would like to create a validation rule (I have PE and no workflow) for the Opportunity Product, that sets the TotalPrice to zero (0) when a checkbox Sample__c is true.  

 

The UnitPrice still has a value (e.g. $25 - for the cost of the sample), but this should be excluded from the TotalPrice of the line item, but most importantly, excluded from the overall Opportunity Amount.

 

Happy for other suggestions/strategies to meet this requirement.

 

Thanks in advance.

Best Answer chosen by Admin (Salesforce Developers) 
@anilbathula@@anilbathula@
Hi JPINO,

Validation rule wont make the Total price to zero,when the sample__c is true.But it wont allow the user to save the record,when sample__c is true and Total price is not zero for this user must make Total price zero manually and save the record.

Validation rule:-AND( Sample__c=True,Totalprice<>0)

All Answers

@anilbathula@@anilbathula@
Hi JPINO,

Validation rule wont make the Total price to zero,when the sample__c is true.But it wont allow the user to save the record,when sample__c is true and Total price is not zero for this user must make Total price zero manually and save the record.

Validation rule:-AND( Sample__c=True,Totalprice<>0)
This was selected as the best answer
JPINOJPINO
Thank you very much Anil!