Condition_CanCreateSiteEventOnFreeTime
Description
Checks whether a social event can be created at the earliest free hour for both the BaseObject (host) and the NonBaseObject (target). Uses the same resolution logic as Execute_CreateSiteEventOnFreeTime: template lookup, template condition check, site resolution, and a 7-day free-slot scan.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The host entity (Self or Target). The other character is the single invitee. |
| CompareType | Equal: a free time slot exists; NotEqual: no free time slot was found. |
| S1 | SocialEventTemplateTable row ID identifying the event template. |
| S2 | True to restrict the search to weekends and public holidays only. False or None for any. |
Examples
| Description | BaseObject | Command | CompareType |
|---|---|---|---|
| Check if a social event can be booked on any day | Self | CanCreateSiteEventOnFreeTime | Equal |
| Check if a social event can be booked on a weekend/holiday | Self | CanCreateSiteEventOnFreeTime | Equal |
| Check if NO free time exists for this social event | Self | CanCreateSiteEventOnFreeTime | NotEqual |