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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Resource Requirement Id is not considered when running msdyn_searchresourceavailability

(0) ShareShare
ReportReport
Posted on by 30

What is the correct way of specifying an existing ResourceRequirement in msdyn_SearchResourceAvailabilityRequest?

With the following:

var req = new Xrm.Entities.msdyn_SearchResourceAvailabilityRequest()
{
RequestName = "msdyn_searchresourceavailability"
};

// Resource Requirement
Entity newReqObject = new Entity("msdyn_resourcerequirement");

var startTime = DateTime.UtcNow.Date.AddDays(1);
newReqObject["id"] = Guid.Parse("ebf79b73-d06c-ec11-8943-000d3a314d4a");
newReqObject.Id = Guid.Parse("ebf79b73-d06c-ec11-8943-000d3a314d4a");
newReqObject["msdyn_resourcerequirementid"] = Guid.Parse("ebf79b73-d06c-ec11-8943-000d3a314d4a");

....

I never get the matching ResourceRequirement in the Outputs.

pastedimage1641921561089v1.png

I have the same question (0)
  • FeifeiQiu Profile Picture
    on at

    Please refer to this doc docs.microsoft.com/.../search-resource-availability-api for how to use Searchresourceavailability API

  • HectorMeneses Profile Picture
    30 on at

    Hi FeiFeiQuiu!

    That API does not have good examples on how to use it and it basically does not work correctly with bookable resource categories. It was a time waster for me. Maybe the docs should be updated together with the API.

    When I found and start using msdyn_SearchResourceAvailabilityForRequirementGroup and msdyn_CreateRequirementGroupBooking I was able to see correct results coming back from the APIs.

    These two APIs require creating requirement groups which makes them more complex to use but at least they work correctly.

  • Suggested answer
    Gabriel Dias Junckes Profile Picture
    2,428 on at

    Hi Hector.

    The API msdyn_searchresourceavailability does not use the ID to filter the resource. You will have to set all the values manually on the API parameters. E.g. Start and End date, Territory, Org Unit. etc.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 65 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 36 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans