Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Restore deleted recurring system job (Bulk delete completed system jobs)

Posted on by 95

A colleague has accidentally deleted the recurring system job Bulk Delete:"Delete Completed System Jobs".

The job still exists in our test organisation/environment. How do we restore this system job on our live environment?

Thanks

*This post is locked for comments

  • MohamedIsmail Profile Picture
    MohamedIsmail 95 on at
    RE: Restore deleted recurring system job (Bulk delete completed system jobs)

    Sorry I only saw the most recent response. The one where you suggested creating a new job sounds like the way to go.

    Thank you Goutam.

  • MohamedIsmail Profile Picture
    MohamedIsmail 95 on at
    RE: Restore deleted recurring system job (Bulk delete completed system jobs)

    Thank you Goutam,

    I appreciate your help. I'm going to try to avoid doing unsupported changes. We may need to find a workaround in another way. It may just not be possible to do in any supported way.

    Thanks again,

    Mohamed

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Restore deleted recurring system job (Bulk delete completed system jobs)

    Although this is not supported  way to change directly in the table but you can do this without any issue I guess.  

    Sorry I have not tried just assuming following steps you can try, I am not concern about migrate primary GUID of the table -

    - Restore the old database in another database in same DB server .

    - Find out which data  has been deleted and need to migrate. Based on that you need to put where condition let's say created by or date something like this.

    - Prepare query like below

    INSERT INTO dbo.AsyncOperationBase (

       column1

       ,column2

       ,column3

       ,column4

       )

    SELECT column1

       ,column2

       ,column3

       ,column4

    FROM [reatoredbname].dbo.AsyncOperationBase

    Try to do it for one record first by providung  where condition  and check you can see the data in UI

    If everything is fine you may delete all the  data from your live DB apart from which has recently created compare to old DB backup and then migrate all the data  from back DB.

    Hope this helps.

  • Verified answer
    Daniel Wikell Profile Picture
    Daniel Wikell 2,360 on at
    RE: Restore deleted recurring system job (Bulk delete completed system jobs)

    Hello Mohamed

    It sounds like you just want to have a recurring job with the same functionality back in the live Environment. By comparing with the job in the test Environment you should be able to just set up a new bulk deletion job and apply the same criteria. Set the recurrence of this job to be the same as before and you should have your job back. This will not be exactly identical to the deleted one in the sense that the job is now user owned and not system owned but I believe this should have no impact on the outcome as long as the user who sets up the new job is a system administrator.

  • MohamedIsmail Profile Picture
    MohamedIsmail 95 on at
    RE: Restore deleted recurring system job (Bulk delete completed system jobs)

    Hello Goutam,

    Thank you, we are using on premise. Does that mean we can migrate the system job from a backup without restoring the whole database? Is there a tool that can do this? Sorry this is new to me.

    Thanks,

    Mohamed

  • Suggested answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Restore deleted recurring system job (Bulk delete completed system jobs)

    Hello Mohamed,

    Unfortunately you can not recover system jobs  data .When you delete any system jobs its basically hard delete from AsyncOperationBase table of CRM database. One possible way if you have old db backup and migrate those data if you are using on premise environment.

    I just tested in my local on premise environment.

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans