Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Delete Email Messages record in SQL DB.

Posted on by Microsoft Employee

Hi All, 

We have an CRM 2011 on-premise applicaton. We want to delete all the e-mail records with "Pending Send" status. We have queried using advance find and found out that has 5000+ records. 

 

Is there a way to delete the email records in back end (CRM SQL Database)? If yes, please help to create the script. 

Thank you all for the help.

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Delete Email Messages record in SQL DB.

    You should use delete jobs. Go to Settings-->Data Management-->Bulk Record Deletion. Use a criteria to select records and run the job.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Delete Email Messages record in SQL DB.

    I don't think it's a good idea to delete a record using SQL in CRM. If you want to delete records using bulk delete functionality of CRM:

    technet.microsoft.com/.../dn531072.aspx

  • Suggested answer
    Emre GULCAN Profile Picture
    Emre GULCAN 2,379 on at
    RE: Delete Email Messages record in SQL DB.

    Hi,

    SQL commands (insert, update, delete) are not supported on MS CRM database.

    You should use SDK 's Delete method (msdn.microsoft.com/.../microsoft.xrm.sdk.iorganizationservice.delete.aspx)

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

Featured topics

Product updates

Dynamics 365 release plans