Microsoft graph beta end point exposed a new property on the Calendar Event entity for series master id type. Documentation says
"Contains the id property values of the event instances that are exceptions in a recurring series.
Exceptions can differ from other occurrences in a recurring series, such as the subject, start or end times, or attendees. Exceptions do not include cancelled occurrences.
Returned only on $select and $expand in a GET operation which specifies the id of a series master event (that is, the seriesMasterId property value)."
I am running this query but still don't see the above property, What am I missing?
https://graph.microsoft.com/beta/me/events/AAMkADljY2EwNjU2LWVhYTItNDlmMy05ZWE1LTA5Zjc5YzhhZTMyYwBGAAAAAAAJYBHio4VlTKwYgFRcz_44BwC0bqbZ5NLFRoWa_zAJHejIAAAAAAENAABqBW9?$select=subject,body,bodyPreview,organizer,attendees,start,end,location,cancelledOccurrences,exceptionOccurrences
According to example in official documentation for beta API you're missing $expand=exceptionOccurrences so your URL should be:
https://graph.microsoft.com/beta/me/events/AAMkADljY2EwNjU2LWVhYTItNDlmMy05ZWE1LTA5Zjc5YzhhZTMyYwBGAAAAAAAJYBHio4VlTKwYgFRcz_44BwC0bqbZ5NLFRoWa_zAJHejIAAAAAAENAABqBW9?$select=subject,body,bodyPreview,organizer,attendees,start,end,location,cancelledOccurrences,exceptionOccurrences&$expand=exceptionOccurrences
Note that current example in the official docs may still contain some editing errors (e.g. missing & that separates query string parameters).
Related
I need to track changes in any property of any user but it is not working for all properties. Here is what I'm doing:
I query the list of users using that request:
https://graph.microsoft.com/v1.0/users/delta
I follow the link in #odata.nextLink then save the link in #odata.deltaLink.
I update the displayName property of a user in Office portal.
I follow the previously saved link. I can see the updated value of displayName among other basic properties of that user.
The problem is that if I do the same with the department property, the user is returned but the new department value is not included in the json.
In the documentation(https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_overview), it is said:
Updated instances are represented by their id with at least the
properties that have been updated, but additional properties may be
included.
which is not the case here.
I have also tested the jobTitle property which is not working at all, meaning that if I change its value, the delta link does not show any change at all. I suppose it is the same for many other properties..
Is there something I'm doing wrong?
I am able also to reproduce this issue. And event I specify select to display the department property, it still doesn't show in the changing result.
Based on the test, it seems that this property doesn't including in the track changes. If you have any idea or feedback about this REST, you can submit it from this link.
There's a method posted here which purportedly enables an app to get an event (copied below for convenience). The event, the link claims will be returned with its resources.
event = service.events().get(calendarId='primary', eventId='eventId').execute()
print event['summary']
What should I provide in place of the string eventId? I created fake events on my calendar (e.g. FakeEvent1 and FakeEvent2) but using FakeEvent2 as a string results in the error event not found.
I know for sure that I am successfully communicating with the Calendar API, because when I use the list method, it returns a list which indeed contains FakeEvent2. The problem is, the name of the event cannot be used as the string 'eventId'. I even tried replacing the name of the event with different properties returned during the list call, like event description and event etag, but to no avail.
You can get that from the list method, as demonstrated on the documentation page you link to for that method. At the bottom of that page, there is an API explorer: click "Authorise requests" and accept the popup, then put in "primary" in the calendarId field and click execute. You'll see a list of events in your calendar, each of which has an "id" field: you can use that ID in your get method.
When you insert an event through the API, the Events resource returned by the API contains an id parameter, generated by the API servers.
If you created the event manually, then the eventId is harder to find. You can use the list()method with the ?q parameter to search for the event.
I am not a Python developer, but based on these Python examples, I would expect something like this :
service.events().list(calendarId='primary', q='FakeEvent1')
I would like to add that providing "id" gives you the eventId.
i.e.:
print event['id']
I had issues going through a list of events, deleting those within my time search. In the google API overview for list the property name "id" is not included. However calling the list method in the explorer (as suggested by accepted answer) shows the property name listed.
I'm trying to get over a limitation in Salesforce where Lead objects can't have related lists that convert with the Lead over to Opportunity, Contact and Account. I have set up 4 objects of type Lookup Relationship, and created a dummy record in each.
I want to use Custom Settings to store the id of each of these dummy records, so that when the Lead converts, any custom objects can also convert to objects with Master/Detail relationships on the respective standard objects.
My trigger on Lead(after update) tries to create a Map of the Custom Settings:
Map cs = AcctId__c.getAll();
AcctId__c is the Custom Setting api name. Compile time is giving me the above message.
Now, I copied this code directly from the Salesforce documentation. What am I forgetting?
I believe that you must include the actual map definition <String,AcctId__c> after the word Map.
Check out this page.
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_maps.htm
I have an object model where I'm checking a filter value of nested child property e.g.
Order -> Customer
And Customer has a property e.g. Name = "Joe Bloggs"
My domain service returns IQueryable<Order>. My domain data source is bound to this (and in turn my Grid is bound to the domain data source), and I have a filter descriptor set as something like this:
<ria:FilterDescriptor Operator="Contains" Value="{Binding Text, ElementName=txtCustomerName}" PropertyPath="Customer.Name" IgnoredValue=""/>
This all works great, except the relationship between Order and Customer is optional i.e. an Order may not have a Customer and therefore the Customer navigation property may be null. In such a situation, when running the query, the domain data source throws a null reference exception - presumably because it's trying to traverse the Customer and get the Name value when of course the Customer is null.
Has anyone come up with a good solution to this problem?
I ended up solving this by using the MVVM equivalent to the DomainDataSource - the DomainCollectionView and its associated classes. With this, you have more control of your query composition and I therefore made my query do a null check on the Customer property before evaluation the Name property on it.
I'm using the managed API of EWS to synchronize a scheduling application with exchange calendars. I get all normal meetings fine, but I am not getting any repeating/recurring appointments.
My code follows:
itemChangeCollection = _service.SyncFolderItems(
new FolderId(WellKnownFolderName.Calendar,
new Mailbox(Email)),
propertySet,
null,
Settings.Default.ExchangeSyncFetchCount,
SyncFolderItemsScope.NormalItems,
syncState);
What do I need to change to see the recurring appointments as well?
Instances of recurring appointments are not "real" items in the store. They are virtual in the sense that they are calculated whenever you perform a search with a calendar view and a timeframe.
The only way to find recurring appointments is to use the FindItems method.
SyncFolderItems only returns the necessary information to reconstruct a recurring serie but does not expand the individual occurrences. If you need expanded occurrences you need to use the FindItems method.
However, even assuming you can expand the recurrence yourself, SyncFolderItems alone does not provide all the necessary information.
SyncFolderItems will return a list of events with Single or RecurringMaster AppointmentType. A RecurringMaster event contains the ModifiedOccurrences and DeletedOccurrences properties. Unfortunately the items in ModifiedOccurrences only contains the ItemId, not the Item itself. It seems necessary to solve all exception separately to get the fields of modified occurrences. From the documentation:
Each OccurrenceInfo object in the ModifiedOccurrences collection
contains four properties: End, ItemId, OriginalStart, and Start. To
access additional properties on the exception item, you must bind to
the item by using the OccurrenceInfo.ItemId.
foreach (OccurrenceInfo item in recurringMasterItem.ModifiedOccurrences)
{
Appointment modifiedItem = Appointment.Bind(service, item.ItemId);
Console.WriteLine("Subject: " + modifiedItem.Subject);
}
In other words, with the data you get from SyncFolderItem you can expand a recurrence, including time exceptions and deleted occurrences but you would have to resolve exceptions on other fields (ie. summary, body, location. etc) with additional .Bind() calls.
SyncFolderItems will give you the recurring master items, but does not expand them into occurrences. The recurring master holds the common properties for all items, the recurring pattern and a list of exceptions and deletions. This is all the information required to expand them to occurrences. Although you are supposed to call Appointment.BindToOccurrence to bind the properties for an individual occurrence from a recurring master based on an occurrence index. The downside is this makes an EWS call for each occurrence.