Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Field Definition Feature Development

  Asked By: Tapasvi    Date: Sep 04    Category: Sharepoint    Views: 851

In an elements.xml file I've specified a field using GUID

I had an error after I installed it, so I copied over the same elements
file with a modification defining this field as ....xxxB

I did an installfeature -force. Now I am unable to remove the content
type that was associated with GUID ...xxxA. I get an error "content type
is in use" but it isn't associated anywhere, or used in any pages, not
even in the recycle bin.

I think I figured out that was because I needed to do an
"uninstallfeature" as well, so I added a dummy entry with GUID ...xxxA
and tried uninstall feature. The column is still there, presumably
because there are other attributes like StaticName, Name, or DisplayName
that didn't match the old ..xxxA entry when it was uninstalled.

Is there a way I can go clean out orphan columns that I installed this
way? Can I force uninstall the content type (added manually, not with a

What is best practice for development such as this? Do I just need to
make sure I do an uninstall with the old file before I do an install
with a new one?



3 Answers Found

Answer #1    Answered By: Gwendolyn Acosta     Answered On: Sep 04

Simpler question.... Even if I include a field  with a certain guid
within a feature, and then I uninstall  it, I can still access it through
the content  type that uses it.

I don't understand why that content type  stays

Can I get rid of it?

Answer #2    Answered By: Kyle Hernandez     Answered On: Sep 04

If you use it even once in a record you can't uninstall  the field  or the
feature based on it until you delete all the records using the field.

Answer #3    Answered By: Kedar Phule     Answered On: Sep 04

You can't delete an existing content  type while there are records in the
system based on the content type. You need to delete all the records that
were added  using that content type  first. Then de-activate and uninstall
the content type.

Didn't find what you were looking for? Find more on Field Definition Feature Development Or get search suggestion and latest updates.