New answers tagged

0

To explain the difference, your original code is creating a NEW content type in the target collection SPContext.Current.Web.ContentTypes: SPContentType ct = new SPContentType(SPBuiltInContentTypeId.Document,SPContext.Current.Web.ContentTypes,ddl_ContentTypes.SelectedValue); While the code in the answer (SPContentType ct = ...


1

An other option is to use CSR (here is some basic info for setting the JSLink property on a webpart: http://www.learningsharepoint.com/2013/09/16/set-js-link-webpart-property-in-sharepoint-2013/). CSR is the new way for customizing how your fields are rendered. Following code will output the filename including the extentions: ...


0

Well, I don't know how to get the file type directly into the name column, but you can show the column file type. Approach: The normal view: Open the site with the document library where you want to show the files extensions in SharePoint Designer 2013. Open the All Documents View in the advanced mode. (Picture is in German) Search for the ...


0

I've recently had the same need. Unfortunately, I think there's no way to create a new document using REST, because you actually have to UPLOAD something. In my solution, I made a copy of the template and uploaded it to the library. var templateString = 'yourSite/pathToTemplate/templateName.docx'; var newDocString = ...


0

It works. I don't know why, but as I said, I didn't do anything and my field became optional. Then I think how I do it is the good way. Unfortunately, the changes seem to happen later for no apparent reason.


0

We've build a "fix" for this problem. If someone is still looking for reliable solution that will generally solve this, let me know.


2

Just go to your display form, edit the page and add the listview webpart of the other list you want to get data from. Edit the properties of this listview and add a webpart connection that connects the listview with the display form. There you can choose which field connects to what. ...


0

I will give here some steps I did: I created my own refiner for the content types. I took the standard one and added the lines: if (ctx.RefinementControl.propertyName == "SPContentType") { var blacklist = [ "Comment", "Element", "Document", "Folder", ...


1

I am not able to add a comment hence writing in the answer section. There are 2 scenario which you should verify. Scenario-1: Go to "File-> Publish" and verify your target library. Scenario-2: Verify your data connection once because there might be wrong target specified there. Let me know if above scenario defines your problem. Thanks


0

Unortunately I was not able to find the problem. Restarting the entire server solved my problem.


1

Turn management of content types back on. You will have a list of columns that includes "Used in." So if Column B is used in Content Type B only, it can be deleted.


3

Document library require content types that are inherited from Document Content Type. This is required because it needs a File field to store the file data. In case of Custom List, it is just like an Excel File with columns (Meta data) and don't require a mandatory File object (in case of doc lib) Also I don't think its a good design to have both using the ...


0

Your new field needs to be a part of the content type to be displayed on the new/edit forms. I think the easiest solution is to go to list settings (on UI), find the content type (Category Factory Implementation Plan List Item), click on it to open its customization page. Click on "Add from list columns" link on the page, and add the "Opportunities" column ...


0

As @Christoffer stated in comment, open document library with explorer which option is available in ribbon. Copy all documents in folder in local drive. Delete documents from document library. Delete content type and again copy all documents in document library with explorer.


0

This is now resolved, after modifying my C# code I attempted to associate the workflow to my library to see if this would work and also included following line of code "workflowAssociation.AutoStartChange = true" and what I found while debugging was that I had a error on this line "Operation is not valid due to the current state of the object". I started ...


0

I am having the same problem. Unfortunately I do not have PowerShell ATM. I did go to the Site Pages tab in SPD2013 and the custom content type I would like to delete is not listed there. Any ideas on why I cannot delete my custom content type? It cannot be used anywhere as I just created it today and did nothing else with it.


1

Note that all fields properties that have a return type of boolean, are set binarily (i.e. 1 = true, 0 = false). I would recommend looking at the return types of each of the properties you are trying to set on MSDN, SP Field Properties. It looks to me as though all your Boolean values are being incorrectly set. Set thusly; <Field ...


0

You cannot do this in a single query. You would have to write multiple queries...something like. ContentType=InfoList Status=Active retrieve the Path to the containing Site. ContentType=PDoc DocType=AAA Path=Path from #1 You can do this in JavaScript or and App or C# Code depending on your skill level.


1

I dont think there is a universal way. From my experience there is no simple way to enfore this but you might be able to via workflows. You can add required to the columns which will force the user to in certian upload scenarios, mainly when saving direct from the document to a location or when saving after opening from SharePoint.


2

Please check the forms in SharePoint Designer and take a look which one is set to default for the edit form. If you don't have access to SPD please check the URL of the editform. The normal one is /EditForm.aspx The first steps how to customize your forms is shown here: https://afrait.com/blog/custom-new-edit-or-display-form-in-4-steps-en/


2

Edit form is a custom form...which is being customized not to include Description column in Edit form. How about Display form..there do u see any description field? Open the forms in Designer and create a new edit form and set it as default. you will be able to view all fields in edit form.


0

Then you should used a forms library and create your own custom content type that inherits from Document Content Types > Form. There's not a way to do this with an existing content type that inherited from Document. Plus side is, if your fields are already in the inforpath form, all you have to do is promote them when you publish the form to SharePoint.


1

I guess creating documents based on a template is not available in JSOM, however you can create such documents within a SP Lib, by directly using Office API method baked in SP core.js. Creating Documents via the Web App CoreInvoke('createNewDocumentWithRedirect2', event, '[template URL]', 'http://[server]' + (ctx.rootFolder == '' ? ctx.listUrlDir : ...


0

Try look into this Change the 'Trust Center' Settings: Sometimes, the enabled protected view settings under 'Trust Center' prevent the Word file from opening. Mentioned below are the steps to change the settings of 'Trust Center': Open your MS Word application. Click 'File >> Options'. Select the 'Trust Center' and press button under 'Trust Center ...


0

This was answered in TechNet. Essentially, the answer is: Use the DocumentSetTemplate.DefaultDocuments.Add() method to add default documents to the Document Set content type. The DocumentSetTemplate class is found in the Microsoft.Office.DocumentManagement.DocumentSets namespace.


2

Try this SPListCollection lc = oWeb.Lists; lc.Add("SampleList", "", SPListTemplateType.GenericList); SPList l = oWeb.Lists["SampleList"]; l.EnableVersioning = true; l.ContentTypesEnabled = true; l.Update(); l.ContentTypes.Add(oSiteCollection.RootWeb.ContentTypes["SomeCT"]);


0

In that case, did you tried the Content Search Webpart? It very easy to bring on multiple content types and from multiple lists.


1

If you head over to the view/create a new view in the list, there should be a column called Content Type that you can add to your view, filter by or even group by.



Top 50 recent answers are included