How to sync All-Day Events from MS Exchange to SharePoint Online calendar?
If you have the requirement to synchronize calendars from Exchange to SharePoint, there was no way to do that wirth the help of the Layer 2 Cloud Connector.
- All-Day events from SharePoint are build slightly different than from Exchange. For example, the duration of an one-day event in Exchange is (obviously) one day, in SharePoint it is 23 hours and 59 minutes.
- Therefore, to achieve a similar data structure we have to adjust certain fields to values SharePoint can understand. This can be done with the help of the Dynamic Column feature in the Cloud Connector.
- You need to create four Dynamic Columns to replace the Exchange columns. Once you created them, you have to map them in the Cloud Connector mapping section to their appropriate SharePoint fields.
What are Dynamic Columns?
The definition of Dynamic Columns is based on the programming language C# in version 6. Either a valid C# expression or a valid method-body returning a value on all possible code-paths are acceptable. The code used includes common parts of the .NET Class-Library, but currently does not allow loading additional assemblies or namespaces. It is, however, possible to load additional assemblies through reflection.
Create the Dynamic Columns in this order you can see on the screenshot below.
Save and run the synchronization - now you should have your All-Day Events properly shown in your SharePoint calendar.
Please note: This examples uses the Exchange Naming Scheme, if your ConnectionString includes the NamingScheme=SharePoint property, you have to adjust some values in the code.
- IsAllDayEvent => fAllDayEvent
- Start => EventDate
- End => EndDate
This code is for uni-directional synchronization from Exchange to SharePoint.
All required informations about Dynamic Columns you can find in the user documentation of the Layer 2 Cloud Connector.
If yo have further questions or you are interested in this solution, feel free to contact us direktly at firstname.lastname@example.org