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
Lukasz PiziakLukasz Piziak 

Validation Rule on Roll-Up Summary

Hello,

I'm looking for help with creation the Validation Rule based on Status field (Picklist) and Roll-Up Summary field. Basically I would like to avoid user approving the record when the SCMC__Total_Value_of_PO__c is equal zero. I have creatwd the following formula, but system is allowing me to approve the record, please see below:

AND(
    ISPICKVAL(SCMC__Status__c,"Approved"),
    ISNULL( SCMC__Total_Value_of_PO__c)
)

When there is no value on Roll-Up Summary field the following data is displayed; EUR 0.00.
Thanks for any advise.

Regards
Lukasz
 
Prateek Singh SengarPrateek Singh Sengar
Hi Lukasz,
Since validation rules executes before your approval action this will not stop the approval process. Inorder to induce error and stop approval action based on criteria you need to write a trigger.