Tag Info

New answers tagged

1

Based on previous answers the approach I can think of is to add an event receiver which checks who the user is as denies the change if they are not allowed. You could use the SPListEventReceiver FieldUpdating event. https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.splisteventreceiver.fieldupdating(v=office.14).aspx You would need to ...


1

Couple of things to check: Make sure that MMS proxy associated with the web app.( Central admin > Application management > web app and from ribbon select service connection) Also check if MMS services is running on at least one server in the farm.( Central admin > Managed Services on server.) Also browse the MMS from central admin and see if it working ...


1

You can use PowerShell as below $site = get-spsite http://sitecollectionurl foreach($web in $site.AllWebs) { $libraryName = "DocumentLibrary" $list = $web.Lists[$libraryName] if($list) { #logic to update the library; like modifying field information etc. } }


0

You can try Managed Metadata fields in this scenario where the admins for Taxonomy are separate set of users with in SharePoint. Let me know if you have any questions.


1

If the Issue Status field does not meet your requirement you should not use it and use a custom column instead. If you envision this list being used in multiple places and across site collections I'd suggest using a Managed Metadata field, because once your users start using it they will find they need additional choices.


0

I know its quite late for an answer, but following is the PowerShell code which can be helpful to remove ITEM content type from custom list. Add-PSSnapin "Microsoft.SharePoint.PowerShell" $web = Get-SPWeb "UrlOfYourSite" $list = $web.Lists["YourListName"] $ctToRemove = $list.ContentTypes["Item"] if($ctToRemove) { Write-Host ...


0

You can use below JavaScript var clientContext = new SP.ClientContext.get_current(); var oList = clientContext.get_web().get_lists().getByTitle("ListName"); var listContentTypes = oList.get_contentTypes(); clientContext.load(listContentTypes); clientContext.executeQueryAsync(Function.createDelegate(this, onSuccess), Function.createDelegate(this, ...


2

In this case, the list that you would want to show the related information, you would create a lookup column to your list that has the prospect content type associated to it. In the configuration of the lookup column, you can select additional columns from the list item to bring over into the list.


0

I have come up with a solution! On the page, I place two web parts: WP1 - XsltListViewWebPart shows the 'flat' view of the Document Library which contains the document sets. So it would show ALL* files within the doc lib, which satisfy a Query within the view, which basically says "give me all documents which contain the {Param} folder in their folder ...


1

Old question but I thought I'd post a possible solution here for anyone looking. There is no such flag and using SPBuiltInContentTypeId is not sufficient because it doesn't include all built in content types. Based on the SharePoint 2013 content types here I've cobbled this together. I've run this on my own farm and the only content types I got back that ...


2

attempting to answer your questions specifically when adding a new column, you'll want to add it to the parent if you want the parent and subsequent children to have the same column. If your parent is an OOTB SharePoint CT, then only add it to your child. I don't recommend modifying SharePoint content types, you never know what Microsoft might do, plus ...


1

The hierarchical relationship allows you to reuse the settings (fields) defined in one content type (parent) in other (child) content types. The hierarchy of content types can be extended to an infinite width and depth, but the best practice is to use 3-level parent-child hierarchy. You could read more best practices on how to manage content types and ...


3

When working with parent/child content types, I do this: The parent has only the fields that will exist in all child content types. Then each child content type only has the fields in it that are needed and are not inherited from the parent. So if your children each have different priority values, then each one would have their own priority field that is ...


0

You can do $site.rootweb.ContentTypes to get all content types. Then for each one, use the SPBuiltInContentTypeId.Contains(ContentTypeId) method (MS reference) to check whether the content type is a built in one. If it is not, it must be a custom created one. Like so: [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") Function ...


0

to manage content types: in Library Settings --> Advanced settings --> allow to manage content types add content types I don't know if it help you because it's same upload document in top menu after upload document you can choose the content type (edit properties Opens immediately you select the file to upload) but, all content types are alloed, ...


0

Query: path:"http://mySiteCollection" (contentclass:STS_ListItem OR IsDocument:True) -ContentType=Picture -ContentType=Image This query will return all items in http://mySiteCollection without Picture and Image Content Type. -ContentType=Image => Content Type not equal to Image OR Not contains Image and Picture Content Type ID Query: ...


0

I had a similar problem while working with CSWP. I needed to include a particular content type id, so I used "=" operator. But to my surprise nothing came through in results. Then I tried "contains" operator, which worked perfect for me. Note: Your query has "ContentType" property but value looks to be of ContentTypeID, may be this can be a problem ...


1

Two things to make sure: Make sure you have published the content types in the hub (as described here) Run the timer job called "Content Type Hub Subscriber" for the web application that the site you want the content type on belongs to from Central Adminstration. Note: This is not possible in Office 365 (SharePoint Online), since you can not manually run ...


1

You can update the associated content type by this indirect route. Suppose you have a content type name $contentTypeName, a web $web, and the list item of your page layout, $item. $item.Properties["PublishingAssociatedContentType"] = ";#" + $contentTypeName + ";#" + $web.AvailableContentTypes[$contentTypeName].Id.ToString() + ";#" $item.Update() ...


1

You can get the list of content types associated with a List. And the first one is the default one. $webs = Get-SPSite http://siteurl | Get-SPWeb foreach ($web in $webs) { foreach ($list in $web.lists) { if($list.ContentTypes.Count > 0) { Write-Host "Default Content Type = " + $list.ContentTypes[0].Name } ...


0

I've come across this issue in the past. In the end I had to carry out these steps: Delete the docsethomepage.aspx file. Copy in a fresh docsethomepage.aspx file. Check out the docsethomepage.aspx file, then check it back in. Go into the document set's settings and check Update the Welcome Page of Document Sets inheriting from this content type This was ...


1

Indexes are associated with List. So you need to modify the list and add index. You can automate this using PowerShell. $site = Get-SPsite http://siteurl foreach ($web in $site.AllWebs) { #foreach ($list in $web.Lists) for ($i = 0; $i -lt $web.Lists.Count; $i++) { $list = $web.Lists[$i] foreach ($ct in $list.ContentTypes) ...


1

I'm going to bump this - agreed with the original poster... in as much as I need to have a way for the newform.aspx to tell the user WHICH content type they are inputting. In my case, I have a big announcements list with events, announcements, marketplace, departmental, and organization-wide announcements. They all have different fields. But perhaps they ...


0

Try this code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.SharePoint.Client; namespace CSOMSamples { class Program { static void Main(string[] args) { //// String Variable to store the siteURL string siteURL = ...


1

You can do it using below code SPList list = currentWeb.Lists.TryGetList("ListName"); if (list != null) { SPContentType itemCT = list.ContentTypes["CTName"]; if (itemCT != null) { list.ContentTypes.Delete(itemCT.Id); list.Update(); } }


2

If you do a .remove() instead of a .hide() the fields could (although I haven't seen it to be the case) get blanked out. You would likely see some sort of post back error in that the HTML delivered is different than what was sent, I saw this a lot when trying to modify dropdown lists. If you hide the rows with a .hide(), the fields are still present in the ...


0

Out of the box columns as well as columns with default values set will not get affected. For example Out of the box columns like Created, Modified, Created By, Modified By will get populated automatically. All custom fields which don't have default value set will store Blank values.


0

Yes you can have custom forms for content types. You need to set properties for the content type, and this can be done in various ways. Below is the PowerShell function which will do the job. I have not fully tested the code, but I think this can be helpful function SetCustomForms-InContentType() { param( ...


0

Yes you can achieve this by updating the default item display template or make a copy of it and customize it based on your requirement. Make sure you map ContentType field in ManagedPropertyMapping of display templates some thing like below in your display template 'Line 2'{Line 2}:'ContentType' Now in the html section ...


0

Yes we can achieve this using display templates. First if you are using an OOB display template, I would suggest make a copy of it in and customize it based on your requirement. Now as you have a hold of a custom display template, Make sure you map ContentType field in ManagedPropertyMapping something like below in your display template 'Line ...


2

If your list/library has multiple content types associated with it, the drop down will appear. If there are other content types that are not being used, remove them from the list and they'll go away. Otherwise, you'll need some script or css to remove/hide it.



Top 50 recent answers are included