Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get user list based on Work hours

(0) ShareShare
ReportReport
Posted on by 1,000

Am using the following fetchxml for retrieve the user based on team Id.

<fetch version = '1.0' output-format='xml-platform' mapping='logical' distinct='true' >

<entity name = 'systemuser' >
<attribute name='systemuserid' />
<order descending = 'false' attribute='fullname' />
<link-entity name = 'teammembership' intersect='true' visible='false' to='systemuserid' from='systemuserid' >
<link-entity name = 'team' to='teamid' from='teamid' alias='ab' >
<filter type = 'and' >
<condition attribute='teamid' operator='eq' uitype='team' value = '" + teamId + @"' />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>

But I need to check the user whether leave on today or not.if the user is leave means we need to exclude and return the remaining users.

The user will apply leave in crm security->users->Workhours->timeoff

82587.Capture.PNG

If the user was set today timeoff then we need to exclude from the fetchxml result.

*This post is locked for comments

  • Kumar Viju Profile Picture
    1,026 on at
    RE: Get user list based on Work hours

    Hi ,

    There are sample code in SDK. You can refer to it for accommodating your business requirement.

    working hours of multiple users -->msdn.microsoft.com/.../gg334424.aspx

    working hours of a user -->msdn.microsoft.com/.../gg327841.aspx

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,865 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,723 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans