Info |
---|
In order keep configuration simple, please perform the following steps in Salesforce Classic (Booker25 is Lightning-Ready, you may afterwards use the app in Salesforce Lightning as you please) |
Use the following procedure to define custom price calculations on resources and services.
1. Create your custom price calculator class
Create a class that implements the interface B25.Util_PluginManager.ReservationPrice. Implementing that interface means the class must have a method with the following signature:
void calculate(B25.Util_PluginManager.ReservationPriceData)
This method will be called whenever a reservation is saved, or whenever the reservation form gets rerendered. You can control when the reservation form gets rerendered, more on that in a bit. The B25.Util_PluginManager.ReservationPriceData object that gets passed along to the calculate method has two properties that will help you to make your own price calculation.
...