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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to fetch Timesheet details of the worker. I want to see the time entered by the worker for particular date using X++ code.

(0) ShareShare
ReportReport
Posted on by

I have a requirement to fetch Timesheet details of the worker. I want to see the time entered by the worker for particular date using X++ code.

I have the same question (0)
  • Suggested answer
    Parag Chapre Profile Picture
    12,254 Most Valuable Professional on at

    Hi Anusaya,

    You can use the below tables to get data from Timesheet

    TSTimesheetTable,

    TSTimesheetLine

    HcmWorker

    TSTimesheetLineWeek

    You can just check the below link. This link mentioned how to create a timesheet for workers but you can use tables/logic to get data from workers.

    axgenius.blogspot.com/.../create-timesheet-for-worker-using-x.html

    Simple solution is to check data entity : TSTimesheetTableEntity and TSTimesheetLineEntity

  • Community Member Profile Picture
    on at

    Hi Parag,

    Thank you . Is there a access restriction to view worker timesheet? . Is it only delegator can view the Timesheet details?. If so how can I see all the worker's timesheet.

    Thanks,

    Anusuya S

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    306,634 Super User 2026 Season 2 on at

    Hi Anusaya,

    When you retrieve information with x++, you can read all records regardless the worker or delegate. With one exception if there is a data policy set up on the tables related to timesheets.

  • Community Member Profile Picture
    on at

    Hi Andre,

    I'm unable to see data from below table via postman app but able to see data from ResourceWorkerView .

    TSTimesheetTable

    TSTimesheetLine

    TSTimesheetLineWeek

    Thanka,

    Anusuya S

  • Suggested answer
    Parag Chapre Profile Picture
    12,254 Most Valuable Professional on at
  • Community Member Profile Picture
    on at

    Hi Parag,

    I do no how to use Odata.

    Thanks,

    Anusuya S

  • Suggested answer
    Parag Chapre Profile Picture
    12,254 Most Valuable Professional on at

    Hi Anusaya,

    Are you able to see data via OData in Dynamics 365 F&O for mentioned entities?

  • Community Member Profile Picture
    on at

    Hi Parag,

    I can see data via SQLQuery. I'm using below X++ code to fetch data ,but I'm unable to view data via postman app.

    while SELECT  hcmworker where hcmworker.Person== person join DirpartyTable where hcmworker.PERSON == DirpartyTable.RECID

          join ElectronicAddressEmail where ElectronicAddressEmail.RECID == dirpartytable.PRIMARYCONTACTEMAIL

                  outer  join  ResourceWorkerView where ResourceWorkerView.worker == hcmworker.recid

                  outer   join  TSTimesheetTable where TSTimesheetTable.RESOURCE == ResourceWorkerView.recid

                 outer   join  TSTimesheetLine where TSTimesheetLine.TIMESHEETNBR == TSTimesheetTable.TIMESHEETNBR

                                outer   join  TSTimesheetLineWeek where TSTimesheetLineWeek.TIMESHEETNBR == TSTimesheetLine.TIMESHEETNBR && TSTimesheetLineWeek.recid == TSTimesheetLine.recid

    Thanks,

    Anusuya S

  • André Arnaud de Calavon Profile Picture
    306,634 Super User 2026 Season 2 on at

    Hi Anusuya,

    With Postman you need data entities not x++ coding. The data you are looking for is not in a single data entity out of the box. You can consider creating your own to retrieve details using Postman.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 310 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 276 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 266 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans