Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Other than Dimension Junctions, which are bookable and can have their own calendar. Related lists are simple lists related to the reservation object. They have similar functionalities as related lists in Salesforce and can be shown on the reservation form.

Related lists allow you to add related records to the reservation from the reservation form. This will allow you to quickly add related data to a reservation without leaving the reservation form screen in the calendar.

Create Related List records

Make sure the object that you want to link to the reservation has a lookup or a master-detail relation to the Reservation object.

  1. Navigate to the Reservation type where you want the related list to appear

  2. Go to the related tab and add a Related List

  3. You need to specify the API name of the relation which can be found by navigating to the lookup field.

  4. On the object, you are trying to link you can create a fieldset which shows when you add a record to the related list in the reservation form. The API name of this fieldset can be put in the corresponding field.

Field

Type

Required

Description

Relationship Name

Text

Yes

Holds the API name of the relation. This can be found on the lookup to Reservation field on your object

Label

Text

No

Label to appear on the reservation form

Order

Number

No

When multiple related lists are shown on the reservation form the related list with the lowest order wil be shown at the top. Blank values are treated as last.

Field Set

Text

No (but advised)

Name of the fieldset on the related object which is used to capture data of that object in the reservation form

Reservation Type

Lookup

Yes

Relates to the reservation type for which this related list is applicable

SObject Type

No

Will be automatically filled in when you save

Reservation Lookup API Name

No

Will be automatically filled in when you save

After you’ve added the record in the system you can see a newly created Related List in your reservation form (when you selected the correct reservation type). It shows a button to add a record:

When you add a record the fields selected in your fieldset will show up.

2. Create Trigger hook

For every Related List you create, make sure you also create a Trigger for its object, which calls the following method: B25.PermissionCheckingTriggerHook.execute()

This makes Booker25 check permissions on the object. Make sure to replace <Related_List_API_Name> with the actual API name of your object, and <Trigger_Name> with a name that makes sense to you.

trigger <Trigger_Name> on <Related_List_API_Name> (before insert, before update, before delete, after insert, after update, after delete, after undelete) {
    B25.PermissionCheckingTriggerHook.execute();
}
  • No labels