locked
Deleting a record RRS feed

  • Question

  • I faced a strange scenario in mscrm 4.0/
    when i delete some data from crm..it is deleted from front end only..
    while at the database level the record is still there.... only deletion status code (attribute/column governing deletion status of a data) changes...

    is it not possible that when i delete data from front end it also gets deleted from database also..

    this is like keeping un necessary data in my database..


    please suggest some solution
    Tuesday, June 2, 2009 5:17 AM

Answers

  • Not so much a strange scenario as how it is designed. My understanding is the async service periodically sweeps through and removes the records marked for deletion. 'My understanding' is code for me not being 100% sure and leaving the door for others to correct me if I'm off the mark ;)

    Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog
    Tuesday, June 2, 2009 5:31 AM
  • Hi Karan,
       
        When you delete a record using the UI the DeletionStateCode of the record is set to 2 in the database. The Microsoft CRM Asynchronous Service the delete the records once every 24 hours to permanently delete the record from the database.

    Below is the list of possible values for the DeletionStateCode and what they mean.

    0  = Specifies that the object is live in the database. 
    2  = Specifies that the object is marked for removal on the next sweep. 

    You can force the Microsoft CRM Asynchronous Service to delete records. You can find the details on how to do that at the post below.

    Hassan.

    Hassan Hussain | http://hassanhussain.wordpress.com/
    Tuesday, June 2, 2009 7:50 AM

All replies

  • Not so much a strange scenario as how it is designed. My understanding is the async service periodically sweeps through and removes the records marked for deletion. 'My understanding' is code for me not being 100% sure and leaving the door for others to correct me if I'm off the mark ;)

    Leon Tribe
    Want to hear me talk about all things CRM? Check out my blog
    Tuesday, June 2, 2009 5:31 AM
  • Hi Karan,
       
        When you delete a record using the UI the DeletionStateCode of the record is set to 2 in the database. The Microsoft CRM Asynchronous Service the delete the records once every 24 hours to permanently delete the record from the database.

    Below is the list of possible values for the DeletionStateCode and what they mean.

    0  = Specifies that the object is live in the database. 
    2  = Specifies that the object is marked for removal on the next sweep. 

    You can force the Microsoft CRM Asynchronous Service to delete records. You can find the details on how to do that at the post below.

    Hassan.

    Hassan Hussain | http://hassanhussain.wordpress.com/
    Tuesday, June 2, 2009 7:50 AM