.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

ContentTypes RemoveFieldRef Ignored

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :SharePoint

Today something strange happened. All my RemoveFieldRefs that i have declared inside my content types have stoped working. Now that i deploy my content types all fields are there tat are inherited from the parent content type. Even though i have declared that they should be removed.

Everything was woeking fine untill a few days ago. I have not done anything special to the content types so its very frustrating.

Bellow is an example of one content type that is inherting from contact. You can se that the removefieldrefs are there but when i deploy they show up anyway!

  <!-- Parent ContentType: Contact (0x0106) -->
  <ContentType ID="0x010600b938cf0791534efaae1469bb65cb8daa"
              Group="SVB - innehållstyper"

View Complete Post

More Related Resource Links

How to filter Values in a ChoiceField, which is used in different ContentTypes?



i have a Base Content Type which is called eaBaseContentType. In this ContentType i have a Field which is called Document-Type. Its an Choicefield with some List of Values.

My Problem is, that i derive from this Base Content Type 10 other ContentTypes and i have to filter the ChoiceField down. That means, that i have the following structure:


      -->   eaSubContentType1 (Derived from eaBaseContentType)

      -->   eaSubContentType2 (Derived from eaBaseContentType)

      -->   eaSubContentType3 (Derived from eaBaseContentType)

      -->   eaSubContentType4 (Derived from eaBaseContentType)

      -->   eaSubContentType5 (Derived from eaBaseContentType)


The eaBaseContenttype has a ChoiceField. But i need only a Part of the values in the drived ContentTypes. How could i do this? I have tried to put a Column  (called Document-Type) only in the derived ContentTypes and not in the eaBaseContentType, but then i get an error that the Field in the Site Column Collection already exists.

How could i achieve this?

How to get List ContentTypes using ECMAScript Client Object Model?

Hello SharePoint Experts, I have a document library in SP 2010 site which also has a custom Ribbon button. The user can select either a folder or a document/List Item from the document library. I want to disable the custom Ribbon button if the user selects the folder and enable it when the user selects document/List Item. I want to do all this using JavaScript/ECMAScript Client Object Model. I tried many things,but could not do it yet. I know I how to check if the currently selected item has a Folder ContentType or an Item ContentType. Code: var _clientContext = new SP.ClientContext.get_current(); var _web = _clientContext.get_web(); var _list = _web.get_lists().getById(SP.ListOperation.Selection.getSelectedList());                                  _clientContext.load(_list, 'Title', 'Id'); _clientContext.executeQueryAsync(Function.createDelegate(this, onListLoaded), Function.createDelegate(this, onListFailed)); function onListLoaded(sender, args) {                                   alert('onListLoaded...');        &n

newlly added content type not exist in SPWeb.ContentTypes


I use a C# application (it uses stsadm.exe) to deploy a content type, and in the same program, I try to get the content type by using SPWeb.ContentTypes[name] right after the content type is deployed,  it returns null. if i exist the c# application and re-run the application, I can get the added content type. I don't know why I cannot get the content type the first time after the content type is deployed. Any thoughts?




ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend