Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Wrong "starttime" value in any Calendar Rules (calendar_calendar_rules) HTTP response

$
0
0

Hi guys,

We need to get schedules of bookable resources from CRM, so we retrieve calendar rules for every calendars.calendarid using this HTTP request:

https://[organisation].crm3.dynamics.com/api/data/v9.1/calendars([GUID])?$expand=calendar_calendar_rules

It works well for me and returns a lot of useful properties according to the spec: learn.microsoft.com/.../calendarrule

The only issue is the wrong value of "starttime" response parameter. This parameter has a DateTime structure but always returns zeroes in the TIME part. Like this: {... "starttime": "2022-11-14T00:00:00Z",...}

I got these zero-time values for any rule in responses when all the rules have different start times in CRM UI.

For example, if we have these 2 time-offs in CRM:

We get the following wrong "starttime"values in the response:

  {
  ...
  "calendarid": "..........-23e6-4521-b4ff-422e50432fd9",
  "calendar_calendar_rules": [
    {
      "@odata.etag": "W/\"16646999\"",
      "businessunitid": "30369384-32d5-ec11-a7b5-000d3a09ed36",
      "groupdesignator": null,
      "pattern": "FREQ=DAILY;INTERVAL=1;COUNT=1",
      "_calendarid_value": "...........-23e6-4521-b4ff-422e50432fd9",
      "offset": null,
      "modifiedon": "2022-11-14T12:53:09Z",
      "timecode": null,
      "subcode": null,
      "endtime": null,
      "ismodified": null,
      "_serviceid_value": null,
      "starttime": "2022-11-14T00:00:00Z",
      "_modifiedonbehalfby_value": null,
      "organizationid": "[.....]",
      "timezonecode": 35,
      "issimple": null,
      "name": null,
      "extentcode": 2,
      "calendarruleid": "e10b2fc2-1a64-ed11-9562-000d3af4f6cf",
      "versionnumber": 16646999,
      "rank": 0,
      "duration": 810,
      "isselected": null,
      "isvaried": false,
      "_innercalendarid_value": "de0b2fc2-1a64-ed11-9562-000d3af4f6cf",
      "_createdonbehalfby_value": null,
      "_modifiedby_value": "e0ed6990-3fe0-ec11-bb3e-000d3af4cdc3",
      "createdon": "2022-11-14T12:49:22Z",
      "description": "Time Off Rule",
      "effectiveintervalstart": null,
      "effort": null,
      "_createdby_value": "e0ed6990-3fe0-ec11-bb3e-000d3af4cdc3",
      "effectiveintervalend": "2022-11-15T00:00:00Z"
    },
    {
      "@odata.etag": "W/\"16647000\"",
      "businessunitid": "30369384-32d5-ec11-a7b5-000d3a09ed36",
      "groupdesignator": null,
      "pattern": "FREQ=DAILY;INTERVAL=1;COUNT=1",
      "_calendarid_value": "...........-23e6-4521-b4ff-422e50432fd9",
      "offset": null,
      "modifiedon": "2022-11-14T12:53:09Z",
      "timecode": null,
      "subcode": null,
      "endtime": null,
      "ismodified": null,
      "_serviceid_value": null,
      "starttime": "2022-11-14T00:00:00Z",
      "_modifiedonbehalfby_value": null,
      "organizationid": ".....",
      "timezonecode": 35,
      "issimple": null,
      "name": null,
      "extentcode": 2,
      "calendarruleid": "8f6d8947-1b64-ed11-9562-000d3af4f6cf",
      "versionnumber": 16647000,
      "rank": 0,
      "duration": 900,
      "isselected": null,
      "isvaried": false,
      "_innercalendarid_value": "8d6d8947-1b64-ed11-9562-000d3af4f6cf",
      "_createdonbehalfby_value": null,
      "_modifiedby_value": "e0ed6990-3fe0-ec11-bb3e-000d3af4cdc3",
      "createdon": "2022-11-14T12:53:09Z",
      "description": "Time Off Rule",
      "effectiveintervalstart": null,
      "effort": null,
      "_createdby_value": "e0ed6990-3fe0-ec11-bb3e-000d3af4cdc3",
      "effectiveintervalend": "2022-11-15T00:00:00Z"
    },
    ...
    }

Has anyone experienced this issue? Has anyone ever got correct values for this property? Is that a known Microsoft bug?

I would appreciate any answer a lot.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images