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 AX (Archived)

How to delete approved timesheet

(0) ShareShare
ReportReport
Posted on by

I am using AX2012 R2 CU7

I have some timesheets that can't be posted due to dimension error, yet it can't be re-submitted or deleted from the front end. It's just staying there on the system. I am using auto approval for testing purposes. Is there anyway I can delete the timesheet from the front end or anybody can share with me the code and how to delete the timesheet from backend, help is appreciated.

There is similar post on this, but no solution so far. Thanks.

*This post is locked for comments

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

    Hi!

    Verify this query: DELETE TSTIMESHEETTABLE WHERE TIMESHEETNBR = 'timesheet number' AND DATAAREAID = 'company id code'

    Regards,

    Pablo

  • Verified answer
    André Arnaud de Calavon Profile Picture
    303,724 Super User 2026 Season 1 on at

    To be able to delete timesheets, the status needs to be reset first. You have to do this for the TSTimesheetTable record as well as the related TSTimesheetLine records. Then you can delete the timesheets. Do this from within AX (not SQL directly) as there are some cascading delete actions which will also delete related records in other tables.

  • Community Member Profile Picture
    on at

    Thanks Pablo and André

    How do I reset the status within AX? The time sheet is already stuck on the status "approved", it can't be rejected, can't be posted (certain lines doesn't have dimension), can't be deleted as well. Thanks.

  • Community Member Profile Picture
    on at

    Hi!

    Can you add the financial dimensions? Open the timesheet and go to details, add the missing financial dimensions and try to submit it again. Please keep us posted.

    Thanks,

    Pablo

  • Community Member Profile Picture
    on at

    Hi Pablo,

    Any "approved" timesheet can only be viewed, even the approver cant reject it again  it can't be edited anymore, that's why I have to resort to deleting it.

    I have 2 things in mind:

    - key in the line financial dimensions from sql, but I don't know where it is stored and how to insert data to it. Thanks.

    - Reset the status from sql for the timesheet to "draft" for header and its line, but I don't know how many cascading table involved and how to to do so, thanks.

    Jack

  • Verified answer
    André Arnaud de Calavon Profile Picture
    303,724 Super User 2026 Season 1 on at

    Hi Jack,

    From within the development workspace (AOT) you can browse for the tables mentioned above. Open the table browser, find the record(s) and you can change the status back to new or draft. Don't set the status to 'all'. Then you are able to make changes in the details like the dimensions or delete them.

    Be careful with this kind of editing data... it's too easy to change the wrong records or fields.

  • Community Member Profile Picture
    on at

    Hi André,

    Thanks for the advice

    but can't just open TStimesheet Table and edit the record

    end up using X++ code to modify the record

    created another thread and coding issue has been resolved as well

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 AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans