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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Selecting only one record from Query

(0) ShareShare
ReportReport
Posted on by 45

Hello,

I have a workflow, which is supposed to create a task owned by some user. This user should be selected out of Team members (from the team with known Business Unit). And the user itself has known Title (Head of the team).

So, I add a Query to my workflow to select all users from the Team which Business Unit has the particular name (e.g. "Support").

So, I receive the list of team members (with their names and titles). But the issue is, if I even specify the particular Title in the query I'll receive 'records' anyway, even though being consisted of only one record. So in the next step I wouldn't be able to provide dynamic value for Task Owner (user), since for CRM my query is supposed to be returning more than one record theoretically.

Is there any way I can ask CRM to return only one record from Query (actually the very first one) being the particular user?

*This post is locked for comments

I have the same question (0)
  • GL-23071537-0 Profile Picture
    Microsoft Employee on at

    Not sure I am following you exactly, but can't you add to your query to select where Title contains "head"?

  • Alex Chu Profile Picture
    45 on at

    Hi Gretchen,

    Thank you for paying attention to.

    I definitely can add Title into 'where' to my query (actually I did from the start) but the issue is that does not solve the problem. Query returns one record but for workflow it's still 'records' array even being consisted of one record which falls under my 'where' criteria. I need somehow to tell to workflow I have only one 'user' object  returned, not the list of users.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans