I have a working VR to prevent the dcrease of the Sales Price once that is has been calculated by a WF.
Now, it exists the case that if the user changes some parameters used by the Sales price calculation WF, the price can decrease and we get a flow error generated by the above mentioned VR.
What I really wanted to prevent by the VR is the only MANUAL price reduction (price can be reduced only by using discount) and let the the Sales Price WF continue to work.
How could I set the VR?
AND(
Business_type__c ="New",
Product2.RecordType.Id ="012b0000000sdNW",
ISCHANGED(UnitPrice),
PRIORVALUE(UnitPrice) > UnitPrice,
OR(
ISBLANK(Discount), ISBLANK( Opportunity.Discount_rate__c ) ,
Discount = 0)
)
Consider that the Sales Price calculation is triggered by the picklist field Opportunity Type, so, when that field is changed the price is re-calculated. So, when the recalculation makes the price higher the VR doesn't block the flow.
If the the recalculation makes the price lower the VR blocks the flows.
I really need an inspiration.
7 respuestas
Hi Mimma,
Could you please post the screenshots of your workflow rule or if not just the rule criteria and the update actions?