Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

Delete Completed time off requests in Dynamics 365 Human Resource

Posted on by 180

I am working in Trial environment. In sample data the leave and absence Unit is Hours. I want to change this to Days since the company I am working for is following leave plans in days. In order to change the unit we need to remove everything in leave and absence entities (more details shared by Nicu in his post Here). So, I removed everything in the same order and data is deleted successfully but still I cannot change unit type.On further digging I found out that there are couple of Time off requests in COMPLETED status. But there is no option to delete these records. Can you help me how I can delete these records so I could finally be able to change unit? As you can see below there is no Delete option. I also tried to cancel these request but no cancel option available too. Please help!!

pastedimage1594860186236v1.png

pastedimage1594860345504v2.png

  • CRMDeveloper1 Profile Picture
    CRMDeveloper1 180 on at
    RE: Delete Completed time off requests in Dynamics 365 Human Resource

    Hi QianQW,

    I deleted all records in LeaveAndAbsenceRequest entity in CDS but Completed TimeOffRequests are still present in HR. This is such a nightmare. Thanks for your support though!

    pastedimage1594925886732v1.png

    pastedimage1594925931401v2.png

  • qianwang Profile Picture
    qianwang 7,151 on at
    RE: Delete Completed time off requests in Dynamics 365 Human Resource

    Hi CRMDeveloper1,

    Unfortunately, I don't have the environment right now, so I can't test it step by step.

    But logically, firstly delete the approved time off in the CDS entity and check if the approved line still exists. Then you can change the status to cancelled in the LeaveRequest entity and publish the entity. Finally, you can delete the request of cancelled status.

    Try it and check the status again. If it still doesn't work, please create a ticket to Microsoft.

  • CRMDeveloper1 Profile Picture
    CRMDeveloper1 180 on at
    RE: Delete Completed time off requests in Dynamics 365 Human Resource

    Hi QianQW,

    I am sorry to ask but how exactly status can be changed indirectly?

    Thanks.

  • qianwang Profile Picture
    qianwang 7,151 on at
    RE: Delete Completed time off requests in Dynamics 365 Human Resource

    Hi CRMDeveloper1,

    You need to change the status in the entity first and then delete it. There is no option to directly cancel the complete records.

  • CRMDeveloper1 Profile Picture
    CRMDeveloper1 180 on at
    RE: Delete Completed time off requests in Dynamics 365 Human Resource

    Yes already saw that but unable to carry out step-2 which is "Update status to cancelled of the corresponding leave request line in LeaveRequest entity. Publish the change". When I go to timeoff request view there is no option to cancel completed records!!

  • qianwang Profile Picture
    qianwang 7,151 on at
    RE: Delete Completed time off requests in Dynamics 365 Human Resource

    Hi CRMDeveloper1,

    Try the steps provided by Agne.

    community.dynamics.com/.../how-to-delete-completed-time-off-request

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans