Tag Info

New answers tagged

0

In short, you will need to create custom Display Templates (both a control and an item template). I would suggest the following MSDN pages: What's new in SharePoint 2013 search for developers SharePoint 2013 Design Manager display templates


0

Okay, I had an idea, and creating it as a folder, then getting the item representation of that folder, and then changing that items content type and setting all the custom fields seems to have worked. SPFolderCollection folders = docLibrary.RootFolder.SubFolders; SPFolder newFolder = folders.Add(SALAE_docLibrary.RootFolder.Url + "/foo"); SPListItem ...


2

According to SharePoint 2013 Online App: 403 Response While Downloading Documents from a Document Library article this error occurs when using oAuth App authentication model since Microsoft.SharePoint.Client.File.OpenBinaryDirect method doesn't pass App token The solution is to use Microsoft.SharePoint.Client.File.OpenBinaryStream method instead as ...


1

The options are right in front of you. "Restrict by App" - At the moment you have it set to 'Current Site' which is actually 'Current Web'. You would need to remove this restriction to access the full index. Switch to Advanced Mode, ensure we are looking at Local SharePoint Results source and remove the query in the box. Add the following: ...


0

I would send a POST to ../_api/contextinfo If the credentials are valid, then the call will return a FormDigest, which you would likely need anyway.


2

If you wanna display the latest items, i think you mean the Content Search Web Part. For this you need the enterprise license as it is not available to the foundation nor the standard edition. If you have a Enterprise license, add it by activating the Search-Driven content feature. SharePoint 2013 feature comparison chart all editions For the Search ...


0

I compared 2 separate list requests: web.GetList("Lists/MyList") web.List[myListGuid] Using SQL Server Profiler, I captured extra procedure call (proc_GetTpWebMetaDataAndListMetaData) to get the actual listGuid. Keep in mind all the overhead to create, process, log that extra request. Is it a small performance hit or not in your case - up to you) ...


0

You can do like this private static void InsertToList(SiteUrl) { using (ClientContext clientContext = new ClientContext(SiteUrl)) { if (WindowsAuth) { NetworkCredential credentials = new NetworkCredential(SPUserName, SPPassword); clientContext.Credentials = ...


0

You have 03 options to do this type of developments. In CSOM, there are different flavors - Silverlight, Windows Forms, JavaScript. Depending on your selection, you can connect with SharePoint and perform any activity using one of the above flavors of CSOM.


0

You have to use the Client Side object model. These are the options available. .NET Framework redistributable assemblies JavaScript library REST/OData endpoints Windows Phone assemblies Silverlight redistributable assemblies Here I have posted some basic operations using JavaScript. get the web object using url and rest of the code will be same.


0

If you have addressed the obvious issue of client registration by creating a new Client ID and secret, then this leaves the App manifest file. Just an an after though, please also check your web.config again and ensure that the new App ID and secret is there as well. Are you able to share the manifest file?


0

None of the code above worked for me (SP Foundation 2013). I did it like this: $webUrl = "http://localhost:80" $newTitle = "New Title for the field" $w = Get-SPWeb $webUrl $ct = $w.ContentTypes["My Content Type Name"] $fl = $ct.FieldLinks["MyColumn"] $fl.DisplayName = $newTitle $ct.Update($true) $w.Dispose()


1

Create an External list and add a list view webpart. You will have the SharePoint user experience. You can use SharePoint Designer as well as Visual Studio for this. This is how to do using Visual Studio: Create SharePoint 2013 External List using Visual Studio 2012 Create an External List Using C# Modifying BDC Model Entity in Business Connectivity ...


0

Is this question still actual? Cause you just need to generate a right XML to be imported via ImportWebPart method.


1

It would throw errors at you if the web part is not deployed as a feature on the destination server. You need to package the web part via the Publish option, then use powershell to deploy the feature on the destination server and any errors present will no longer appear.


0

I don't know how it would translate into SP, but if you save a PowerPoint file as .pps it will open as a slide show.


1

I think you may be looking for Office Web Apps. They allow PowerPoint documents to open in the browser. Then you can click "Start Slide Show" in the top menu. If so, I recommend reading Use Office Web Apps with SharePoint 2013.


1

Do you have really any issue, just asking the question...can a content type revert back to default by its own. I never see any issue with content type, where its go back to default one unless some body change it, manually or view workflow corruption etc. If you have issue, please share the more error detail.


2

First of all, you have an update panel. With that you have a few options. You could wire up a server side event to your button and hide the div on button click. The button click would cause an Async Postback which would just update the content inside of your update panel. One issue with your code is you are using normal html elements. To make your ...


1

Well, you can still register scripts in a Web Part through the ScriptLink control: <Sharepoint:ScriptLink ID="ctlScriptLink" runat="server" Name="file.js"></Sharepoint:ScriptLink> You can also just embed the JS in a script tag in your web part for the time being to test if the code works (or use a content editor web part on the page). ...


1

This should work. $('#Hide').on('click',function(e){$('#div000').hide(); }); $('#Show').on('click',function(e){$('#div000').show(); }); Add this inside the page load event.


0

A relativley simple solutions would be: creating a workflow using the "extract substring from index of string" action and add a lookup to the action. Use the following parameters: Data Source: Current Item Created By: Created By Return Field as: Display Name Im not sure if this is what you are looking for, I hope it helps.


1

It will depend upon how your master page is structured. A neat way would be add a new div wrapper inside #s4-workspace and add the CSS for the wrapper class. Include the css/reference from the master page: /* For Fixed Width */ div.wrapper { margin: 0 auto; width: 1000px; } /* For Fluid Width */ div.wrapper { margin: auto 5% !important; ...


1

No, this is exactly what the masterpage is designed for. You're going about it the completely wrong way though. These are CSS customizations. Add the following somewhere in the header: <style> #s4-workspace{ width:1024px; margin:auto; } </style> Modify accordingly Also, go through a CSS tutorial to explain to you the basics: ...


2

if this helps anyone, this code returns the values I needed. List listFields = context.Web.Lists.GetByTitle("Financial Notes"); context.Load(listFields); context.Load(listFields.ContentTypes); context.Load(listFields.Fields); ListItem item; // this is how you can get the item(file), you can also use CAML query context.Load(item = ...


3

This error occurs since requested properties have not been loaded. You have to explicitly specify them in ClientRuntimeContext.Load method. Since you are getting ListItemAllFields property, you have to specify like this: context.Load(listItem, i => i.File,i => i.File.ListItemAllFields); Example 1 In order to retrieve File object with all List Item ...


1

Do you want to retrieve the properties? If yes, then you will find it within your SPListItem -> listItem["Modified_x0020_By"], etc.. But not all of them. Via listItem.File.Versions you get a collection of the file versions which you can iterate through respectively can read the properties e.g. "Level" (Draft, Published...) or "VersionLabel" (-> version ...


0

You should use an Asynchronous pattern here. Since you are assigning a value to the response, it expect a value as soon as line is executed. If you use an asynchronous pattern and use the response on success function, then there will not be a timeout issue. Let me know if you need code level help.


1

var currentContext = new SP.ClientContext.get_current(); var currentWeb = currentContext.get_web(); var currentUser = currentContext.get_web().get_currentUser(); currentContext.load(currentUser); var allGroups = currentWeb.get_siteGroups(); currentContext.load(allGroups); var group = allGroups.getByName(groupName); currentContext.load(group);


1

There is no Groups property for Web client object Use Web.SiteGroups property to get the collection of groups for the site collection, for example: $web.SiteGroups | select Name


1

Yes, actually it is not so easy to accomplish this. to put it in a nutshell your app and your SharePoint both need to trust the same Authentication Provider. Like Azure Access Control or ADFS. Because they will genearte the token AFAIK. Provider hosted apps without an Auth Provider will only work in a Server 2 Server Trust Relationship as mentioned before by ...


2

Use File.OpenBinaryDirect method to downloads the specified file from a SharePoint site. The following example demonstrates how to download file from a Library by providing its item Id. Example /// <summary> /// Download file from a Library /// </summary> /// <param name="context">CSOM context</param> /// <param ...


1

To answer my own question, I found a solution by creating custom action automatically when my feature by anyway is activated. I used SPUserCustomAction, here is a piece of code for someone who will be interested, the code is shortned, but you will see the idea: SPUserCustomAction action = list.UserCustomActions.Add(); action.Title = ""; ...


1

Now it is possible, but you decide if it's a good idea for you. It is completely unsupported and should just be used for a local development machine. Here is a tutorial by me


2

I think it should be the below: =IF(AND(OR([value1]="Select", [value1]=""),[value2]=""),"",[value3]) You can test it in Excel, it should be the same.


0

Change your query like : CamlQuery query = new SP.CamlQuery(); query.ViewXml = "@<View><Query><Where><Eq><FieldRef Name='Title' /><ValueType='Text'>{Title Text Here}</Value></Eq></Where></Query></View>"; var itemts= list.GetItems(query);


4

You are missing the <View> tags in your ViewXml (see example here) It should be string qs = String.Format("<View><Query><Where><Eq><FieldRef Name=\"Title\"></FieldRef><Value Type=\"Text\">{0}</Value></Eq></Where></Query></View>", listItemTitle); query.ViewXml = qs; In case of ...


0

No, you can not have C# code in your App-project, only in you Provider Hosted project


0

Don't forget the versions... The difference is when using versioning on document libraries this will not counted every where. I changed the difference in the table: dbo.AllDocVersions For example: Site.Usage.Storage gave me the value: 220100000 When I counted every data on every site it returned: 95600000 When I calculated the size of AllDocVersions I ...


0

I noticed this a while back while studying the difference on the size between a single site collection in a content database and the actual database size.With Audit logging turned on in the site collection, the database size will always be bigger than what SharePoint reports in the various tools listed above. This was at least the case in SharePoint 2007.


0

After some communication with an old colleague, I found out that when one of the collections is being updated, the other gets updated to... It is default behaviour of System.Collections like ReadOnlyCollection<>.


1

As shortcut you can use sg like: SP.UI.ModalDialog.showModalDialog( { html : $( "<h1>asdf</h1>" ).get( 0 ) } ); NOTE: if you have more than one tag you need to wrap everything into an embracing one otherwise only the first is shown: $( "<div><h1>asdf</h1><p>jkl;</p></div>" ).get( 0 )


0

Sorry for replying with answer after long time. I wondered when I saw there is no answer to this question. So decided to do self-reply to this question. After lots of brain storming I get to know there was silly mistake I did in feature receiver. When I debug application I come to know that I was getting null values from site column properties. Then I placed ...


1

ok, 1) make sure your ammending the correct web application web.config! 2) make sure the safeControl is correct.... by that i mean make sure the ID is the same (check the error assembly id and assembly name), the assembly is correct and also the namespace is correct 3) you can check on the above within project and assembly folder (c:\windows\assembly) ...


2

You can use item.SystemUpdate() when updating the item. This will not cause the Modified By field to change.


1

I can confirm that the (not-so-good) behaviour you are experiencing is indeed the default one. Whoever wrote the Visual Studio template though that using the web part class name inside the namespace was a good idea - probably this was done to avoid name collisions. That said, unless you find or write an alternate template afaik you are pretty stuck with ...



Top 50 recent answers are included