+ Start a Discussion
Kristopher TurekKristopher Turek 

Change pricebook based on date value

We have a standard pricebook and contracts that the rate applies to... when the contract date has expired we would like to have the rates go up say 15%... i assume we need to create a second pricebook and have the higher rate pricebook become standard once the date has passed... how do we do this? Trigger? what would the code look like?
RD@SFRD@SF
Hi Kris

You can make use of process builder, using process builder we can create new records and assing new values to the new record, in your case

1. Create a new process builder.
2. Create a decision box with criteria to 'created and edited to subsequently met the criteria', where the criteria is that the date is greater than the contract end date.
3. Add an immediate action to create a new record, where you can update the price book value to a formula value which gives the updated rate.

Hope it works :)

RD