Events.defaultCalendarForNewEvents
----------------------------------

Returns the calendar that events should be added to by default.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Events](component_Events.md) | [6.2](newinversion62.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "Events.defaultCalendarForNewEvents" { ; AsJSON } ) 

**MBS**( **"Events.defaultCalendarForNewEvents";** /\* Returns the calendar that events should be added to by default. \*/  
**$AsJSON**) /\* Optional; Pass 1 to return result as JSON. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| AsJSON | Pass 1 to return result as JSON. |  | Optional      Added in version **13.4**. |

### Result

Returns calendar identifier or error.

### Description

Returns the calendar that events should be added to by default.  
### Examples

Query name of default calendar:

 MBS ("[Events.Calendar.GetTitle](EventsCalendarGetTitle.md)"; MBS ( "Events.defaultCalendarForNewEvents" ))  
Query calendar with JSON:

 MBS ( "Events.defaultCalendarForNewEvents"; 1)  
<small>  
Example result:   
{ "subscribed" : false, "source" : { "sourceTypeText" : "CalDAV" , "title" : "Mac.com" , "sourceIdentifier" : "68B72E23-6DC9-47EC-9C29-D844DB9F77BD" , "isDelegate" : false, "sourceType" : 2 }, "title" : "Private Termine" , "allowedEntityTypes" : 1 , "supportedEventAvailabilities" : 3 , "allowsContentModifications" : true, "type" : 1 , "immutable" : false, "calendarIdentifier" : "6D73CE3F-4ED1-4C03-BE57-AA3101D14999" , "typeText" : "CalDAV" } </small>### See also

- [Events.Calendar.GetTitle](EventsCalendarGetTitle.md)
- [Events.defaultCalendarForNewReminders](EventsdefaultCalendarForNewReminders.md)

### Release notes

- **Version 13.4**
    - Added AsJSON parameters to [Events.Calendars](https://www.mbsplugins.eu/EventsCalendars.shtml), [Events.Source.Calendars](https://www.mbsplugins.eu/EventsSourceCalendars.shtml), [Events.Item.GetCalendar](https://www.mbsplugins.eu/EventsItemGetCalendar.shtml), [Events.defaultCalendarForNewEvents](https://www.mbsplugins.eu/EventsdefaultCalendarForNewEvents.shtml), [Events.defaultCalendarForNewReminders](https://www.mbsplugins.eu/EventsdefaultCalendarForNewReminders.shtml), [Events.SourceWithType](https://www.mbsplugins.eu/EventsSourceWithType.shtml), [Events.Sources](https://www.mbsplugins.eu/EventsSources.shtml) and [Events.DelegateSources](https://www.mbsplugins.eu/EventsDelegateSources.shtml) functions to return result as JSON.

### Example Databases

- [Mac and iOS/Events/Events Create Event](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Events/Events%20Create%20Event.shtml#1ScriptAnchor_)

### Blog Entries

- [Limited access to calendars on macOS Sonoma](https://www.mbsplugins.de/archive/2023-10-12/Limited_access_to_calendars_on/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.4pr1](https://www.mbsplugins.de/archive/2023-08-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 10th March 2016 , last changed 20th July 2023

  
[Events.StructuredLocation.Title](EventsStructuredLocationTitle.md) - [Events.defaultCalendarForNewReminders](EventsdefaultCalendarForNewReminders.md)

[HTML Version](EventsdefaultCalendarForNewEvents.shtml)