0

So I'm trying to get TeamCalendar information out of Sharepoint in a single call, but I can't get the Attendees out. This is my code:

$.ajax({
    url: "/sites/ecengprodsoft/mt/_vti_bin/listdata.svc/TeamCalendar(32)",
    dataType: 'json',
    async: true,
    success: function(data) {
        console.log(data);
    }
});

Which gives me all the information about an event apart from Attendees, Category, CreatedBy and ModifiedBywhich show as [object Object] but have no useful sub-information inside apart from the URI call to get the right data.

So for example, if I call /sites/ecengprodsoft/mt/_vti_bin/listdata.svc/TeamCalendar(32)/Attendees I get the information I want, but I don't want to have to perform a separate call for each item in the TeamCalendar.

Is there a way to get all the information, including attendees from the TeamCalendar with one call? Perhaps there's some parameters that I can add?

Note that using SOAP this is possible in one call, it grabs all the information.

  • did you try to add the some params more? Take a look on this link odata.org/documentation/odata-version-2-0/uri-conventions – Salvatore Di Fazio Apr 1 '14 at 14:02
  • That's nice, but I still can't see where it explains how to get full sub-objects in one call. Edit: Scratch that, $expand is what I was looking for, thanks! – Jazcash Apr 1 '14 at 14:21
  • 2
    Just and FYI, there are already a number of questions on this site with answers to this exact issue. – Robert Kaucher Apr 1 '14 at 14:31
1

Found it! /sites/ecengprodsoft/mt/_vti_bin/listdata.svc/TeamCalendar?$expand=Attendees

  • 1
    did u see that the answer was on my link?! :) – Salvatore Di Fazio Apr 1 '14 at 14:55
  • It helped, but I found it via another Google search :P – Jazcash Apr 2 '14 at 5:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.