Home
About Us
Services
Custom Programming
Software Consulting
IT Support
Products


Customer Portal
Vendor Portal
Solution Directory
NEWS
FAQs
Locations
Contact Us
Address
 
CRM Subjects will not delete even though every refrence to the subject has been removed
KBA-01050
Problem

THIS ARTICLE IS PROVIDED AS IS WITH NO WARRANTIES.  WE ARE IN NOW WAY RESPONSIBLE FOR ANY RESULTS TO YOUR CRM SYSTEM AS A RESULT OF FOLLOWING THE STEPS OUTLINED IN THIS ARTICLE.

The subject entity will restrict deletion of a subject anytime their is still a valid reference to the subject in CRM.  For instance, if you go to the list of products in the product manager you will find an action that will allow you to reparent the subject of the currently selected product.  If you have to delete a subject then you would want to create an Advanced Find view in the product list that would show you all products = subjectx and then run the reparent action against the subject.  This type of action needs to be run against all entities that are related to the subject.  That list can be found in the relationship section of the subjects entity.  However, the full text catalog of KB Articles will not update even after an atricle's subject has been reparented.

Solution

To solve the problem of a KB Article reference to a subject still existing in the full text catalog within CRM, run the following sql statement against the crm database.

UPDATE DOCUMENTINDEX
SET DELETIONSTATECODE = 2
FROM DOCUMENTINDEX C
INNER JOIN SUBJECTBASE S
ON C.SUBJECTID = S.SUBJECTID
WHERE S.TITLE = 'THE SUBJECT TITLE IN QUESTION HERE'

The above statement will update the deletionstatecode to 2, which will be picked up by the CRM Deletion Service the next time it runs.  You can manually force the delection service to run by:

1)Opening the command prompt

2) type 'CD C:\Program Files\Microsoft CRM Server\Server\bin' and press enter

3) type 'CRMDELETIONSERVICE.EXE /RUNONCE'

4) You should receive a confirmation message that states 'Service successfully executed'

You can verify that the full-text KB Articles were deleted by running the following SQL Statement against your CRM Database

SELECT C.SUBJECTID, C.DELETIONSTATECODE, S.TITLE FROM DOCUMENTINDEX C
INNER JOIN SUBJECTBASE S
ON C.SUBJECTID = S.SUBJECTID
WHERE S.TITLE = 'THE SUBJECT TITLE IN QUESTION HERE'

Finally, you should be able to navigate to the subject and delete it from CRM.

Additional Comments
send your comments to info@easiintl.com

 

 

Attend a Dynamics CRM Launch Event in Houston