Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Let me explain my situation. I have some Document Libaries that derives from some content type some columns.

In some of these columns I have (by mistake) add two times the same columns with different names.

When I tried to delete it from PowerShell I user the command

SPList list = Web.Lists["NAME"];
SPContentType ct = list.ContentTypes["CTNAME"];
ct.FieldLinks.Delete("Descrizione Pratica");
ct.Update();

I believed that these will destroy only the column for the given content type but what I found now is what you can see in the picture:

GREY COLUMN DESCRIZIONE PRATICA

I tried in many way to add the column back to my lists:

  • Adding and removing it from Site Content Type

  • Adding and removing it from List Content Type

  • Adding and removing it from Fields of the list

But the list consider the field horribly wrong: I cannot insert data in that column, I can't se data stored... It's like the column does not exist..

Thank you very much!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I solved the problem in a very strange way.

This is the code:

$list = $Web.Lists["NAME"];
$ct = $list.ContentTypes["CTNAME"];
$ct.FieldLinks["Descrizione Pratica"];
$ct.Update($true);

Executing it from power shell and waiting a couple of seconds, the column started to work in the right way again..

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.