Tag Info

New answers tagged

1

The answer to this question is: No, it is not possible to create another library with the same functionality as Pages on a publishing site.


1

Web Part Pages and Wiki pages can be stored in any document library as long as the appropriate content type has been added to the library via its settings. However, the library actually named "Pages" is created & maintained by the Publishing feature. Attempting to rename or delete it will probably not work and/or cause problems. If you want to create ...


1

Setting ContentType field property ShowInEditForm="FALSE" will not affect the visibility of Content Type Choice control in Edit form. The visibility of Content Type Choice control (ChangeContentType class) is determined the following conditions: whether content types are enabled for the list (SPList.ContentTypesEnabled property) the amount of available ...


0

Code will be something like this SPContentType contentType = myListItem.ContentType; string contentTypeName=contentType.Name https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spcontenttype_properties.aspx


2

Use SPListItem.ContentType. This will give SPContentType. And you can use SPContentType.Name to get the name of content type.


0

I used the following and it works to enable/disable the button when only one item is selected. <CommandUIHandlers> <CommandUIHandler Command="GCMS.CreateActionCommand" EnabledScript="javascript:var EnableDisable = function() { this.clientContext = SP.ClientContext.get_current(); ...


1

If the list contains only one content type then in the CustomAction you need to define following three properties: RegistrationType="ContentType" RegistrationId="YourContenttype" Location="CommandUI.Ribbon.ListView" In the CommandUIHandlers, there is EnabledScript attribute which helps in enabling and disabling a button. You can refer to an .js file which ...


0

Permissions are associated with a list, list item but not with a content type. You can create an item of particular content type and that item can have different permissions. For example, you can have an event receiver attached to a content type or a list and once item is created/updated the permissions associated with it can be changed. See this SP 2010, Is ...


0

Try setting "ContentType" and "ContentTypeId": properties.AfterProperties["ContentTypeID"] = ctId; properties.AfterProperties["ContentType"] = properties.Web.ParentWeb.ContentTypes[ctId].Name;


0

You can try using powershell as the following: $siteUrl = "http://YourServerName/sites/testsite" [system.reflection.assembly]::LoadWithPartialName("Microsoft.Sharepoint") > $null #get the SPSite $site = New-Object Microsoft.SharePoint.SPSite($siteUrl) #Get the root web $RootWeb = $site.RootWeb #Find the list in the root web $mylistname ...


2

So if this is happening to you you should first publish your content type, at your content type hub. From there you should click "Manage publishing for this content type" and you will see 3 options: Publish Make this content type available for download for all Web Applications (and Site Collections) consuming content types from this location. Unpublish ...


0

https://support.office.com/en-za/article/Add-multiple-Office-templates-to-a-document-library-cde94e90-a1ba-4b94-a187-600ed68562bb Created custom content types and follow the above article to add the powerpoint, excel and onenote in the appropriate content type section


1

CommandUIHandler has not only Command and CommandAction attributes but also EnabledScript attribute. It may contains javascript function returning true/false. You may use javascript CSOM to get content type of the item(s) and enable/disable your button. Hiding button completely is different story and is not usual in SP. <CommandUIHandler ...


1

One reason to beware of many content types is the impact it has on general site collection creation times. Each time a new site collection is created, all syndicated content types in connected hubs are copied down to it. So the more content types you have the slower it becomes to create site collections. In our staging environment, we found that once we ...


0

I have encountered the same error today and spend half a day to solve it. In the end the answer from the question http://stackoverflow.com/questions/25857722/visual-studio-unexpectedly-adding-feature-on-load helped me. If the lists in the same feature have the same Type ID, the tooling will move the lists into a newly created feature, because the Type ...


2

I think I had success with this by using the Overwrite=True attribute (https://msdn.microsoft.com/en-us/library/office/aa544268.aspx). Also I believe once the content type is in use in a list instance it might be blocked from being removed. Try deleting the instance and then clearing it from both the first stage and second stage recycle bin then ...


0

You can't. And I am afraid there is no way around this.


2

Just ran into the same issue - here is how you can configure it to show the display names. On the page with the search results (search for e.g. *): click on the settings wheel on top click on edit page in the navigation zone on the left: on the refinement webpart click on "edit web part" now on the right side the web part properties open - click on ...


0

Author field is an internal field and is set automatically to the user id of the user creating the document, like it should. It cannot be set by the user as such. Try adding it to a list view to see the value.


1

WPQ2FormCtx.ItemContentTypeId will give the content type ID of the item in each of the forms newform.aspx, ediform.aspx and displayform.aspx. You can also use WPQ2FormCtx.ItemContentTypeName, if you want to compare name instead of Id. Here is a JQuery code to hide fields in the forms: <script type="text/javascript"> jQuery(document).ready(function($) ...


0

So say you have a list called Documents. It has two columns called 'One' and 'Two'. You make your Linq to SP queries just fine: DataContext dc = new DataContext("http://sharepoint"); var varResults = (from item in dc.Documents where item.Two == "blah" orderby item.One descending select item); Then you ...



Top 50 recent answers are included