Hi,
I want to get all the direct employees of a manager based on manager personnel number or user id,
could you help me please.
Walid,
Do you need this for reporting or for any configuration>
Thanks @Gunjan for you reply,
I need it for some customization in EP.
You can take a look at this method -
\Classes\HcmPositionHierarchyViewController\loadPositions
The query used in the method is used to populate the organization hierarchy. Should help you with finding direct employees under a manager.
Query from below link should also help you . It just select one record but you can do changes to get all positions
community.dynamics.com/.../get-report-to-position-worker-name-with-employment-recid-sql-query
Thanks Surkut for the reply,
but it is SQl query it is not working in X++ editor specially the joins.
Its just for your reference and its very straightforward. . You have to convert that to x++ query. Converting SQL query to x++ query shouldn't be difficult.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 1,841
André Arnaud de Cal... 783 Super User 2025 Season 2
Sohaib Cheema 490 User Group Leader