web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Field Service forum / Scheduling API: Proble...
Field Service forum

Scheduling API: Problem with nested JSON structure

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I'm trying to utilize the Search Resource Availability API with Postman, documentation at cloudblogs.microsoft.com/.../ . I'm using this JSON:

{
    "Version": "1.0.0",
    "Requirement":
    {
     "FromDate":"2019-07-05T18:25:43.511Z",
     "ToDate":"2019-07-05T18:25:43.511Z",
     "Duration":60
 },
    "Settings":
    {
    },
    "ResourceSpecification":
    {
    }
}

I only get an ODATA exception "Does not support untyped value in non-open type". There is a code sample at cloudblogs.microsoft.com/.../ that includes a special library and the function SdkExtensions.Mode.enableNestedEntities.  Is there something similar that I need to do in Postman to allow it to provide nested JSON structures?

I have the same question (0)
  • Suggested answer
    antc Profile Picture
    2,911 on at

    Don't have time to test what happens if you just pass this in the body

    {

        "FromDate":"2019-07-05T18:25:43.511Z",

        "ToDate":"2019-07-05T18:25:43.511Z",

        "Duration":60

    }

  • Al Iggs Profile Picture
    Microsoft Employee on at

    It tells me that Version, Requirement and Settings are required.

  • antc Profile Picture
    2,911 on at

    I can't even see it whats the url?

  • Al Iggs Profile Picture
    Microsoft Employee on at

    {{webapiurl}}msdyn_SearchResourceAvailability

    You only get it when you are on FS v8.8+

  • antc Profile Picture
    2,911 on at

    That's whats confusing have FS V8.8x however missing that entity.

    "message": "No HTTP resource was found that matches the request URI 'http://#####.crm5.dynamics.com/api/data/v9.0/msdyn_SearchResourceAvailability'."

    Capture3.JPG

    Capture4.JPG

  • Al Iggs Profile Picture
    Microsoft Employee on at

    Try ...data/v9.1/

  • antc Profile Picture
    2,911 on at

    I'm no expert however it's to hard to work out with the errors provided hopefully they will come back with an example!

    Using :

    {

       "Version": "1.0.0",

       "Requirement":

       {

        "@odata.type": "Microsoft.Dynamics.CRM.msdyn_resourcerequirement",

        "msdyn_name": "Antony Clarke"

         },

        "Settings":

       {

       },

       "ResourceSpecification":

       {

       }

    }

    I would just get that Settings is required so I assume that the odata.type is required as without it I would get your original exception.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Field Service

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans