Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All of these methods return a list of handlers. Inside the customize method (defined in B25.Form.Customizer), you can directly modify these lists and it will have an effect on the form behavior. For example, to remove all handlers defined on a certain action, you could do the following:

...

List of handlers added by Booker25

Init Handler:

...

New Reservation Default Setter

Name: 'B25 Local Time New Reservation Default Setter'

Type: Init Handler, included in B25.Form.onInit() .

For new reservations, this handler sets the correct local times. It updates the fields B25__StartLocal__c and B25__EndLocal__c.

It also updates the fields B25__Base_Price__c and B25__Calculation_Method__c based on whether the reservation is linked to a resource, and that resource has default values for these fields.

Finally, it executes the configured flow to run for new reservations (if configured).

...

Update Handler: Reservation Type Setting Updater

Name: 'B25 Reservation Type Setting Updater'

Type: Update Handler, included in B25.FormField.onUpdate() for the field B25__Reservation__c.B25__Reservation_Type__c .

If the Reservation Type changes, this handler updates any buffer fields that need to change (see Buffer Time for an article on this feature).

...

Update Handler: SubTotal Update Handler

Name: 'B25 SubTotal Update Handler'

Type: Update Handler, included in B25.FormField.onUpdate() for the field B25__Reservation__c.B25__Subtotal__c .

If B25__Subtotal__c changes, this handler updates the B25__Total_Price__c field to become the sum of B25__Subtotal__c and B25__Service_Costs__c.

...

Update Handler: Service Reservation Subtotal Calculation

Name: 'B25 Service Reservation Subtotal Calculation'

Type: Update Handler, included in B25.FormField.onUpdate() for the fields B25__Service_Reservation__c.B25__Quantity__c and B25__Service_Reservation__c.B25__Unit_Price__c.

If either the quantity or the unit price changes on a service reservation, this handler updates the B25__Subtotal__c field on that record to the value: Quantity * Unit Price.

...

Add Handler: Service Reservation Added Price Defaults

Name: 'B25 Service Reservation Added Price Defaults'

Type: Add Handler, included in B25.RelatedList.onAdd() for the related list B25__Service_Reservation__c.

When a new service reservation is added to the list, this handler sets a few default values:

  • It sets the field B25__Unit_Price__c to the price of the selected service.

  • It sets the field B25__Quantity__c to the default quantity of the selected service, or if that is null, the quantity of the reservation itself.

  • It sets the field B25__Subtotal__c to the value: Quantity * Unit Price.