Hot answers tagged

6

You cannot get the information who a view created because it's not cover by the object model. The SPView object doesn't store a property for modified or created. To get the information all you can do is to get the information from the file. So for the view "All Items" you need to request the file allitems.aspx. The SPFile object stores the "Created", ...


3

As you have tagged SharePoint Apps, You need the client side solution I guess. Following is the REST API solution. @Bhaskar already mentioned that SPView does not store the info who has created it. But when we create a view, SP creates a file like viewName.aspx. We can get this file path by following request. /_api/web/lists/getByTitle('List ...


3

Yes, it's still valid, as it's still a SharePoint. You can read more about the limits at TechNet site: https://technet.microsoft.com/en-us/library/cc262787.aspx As you can see limitation are the same for SharePoint 2013 on premise and SharePoint online


3

No, it won't impact the outcome for production even if you have a separate domain for SharePoint Addins in production. It is used as a security measure, but that requirement may not exist in a development environment.


2

This may because of the SharePoint "Browser File handling" setting. It has to be changed on the SharePoint Centra Admin (or via PowerShell), look at http://sharepoint.stackexchange.com/a/29350/35604 for instance, or here for more details.


2

Using JSOM you can find out whether the user is a domain user or not. But there is no JSOM method available to expand a domain group and find the users. If you want to stick with JavaScript then you should create a web service, that can give you the information. Deploy the web service under SharePoint context and use AJAX for getting the data.


2

_spPageContextInfo.currentUICultureName is the culture used to determine UI's language (Language used in the website's menus) _spPageContextInfo.currentCultureName is the culture used for numbers/date formatting...


2

So you have asked quite a heavy question(s) and I will do my best to answer them for you. Farm Solution So basically this is where you can do nearly anything you want. You have access to all SP artifacts (lists, items, list instances, Content Types, etc). You can add business logic directly to your lists and their items and manipulate data quite easily. ...


2

One of the peculiarities of the add-in model is that when you declaratively create things like content types within the add-in solutions that you're working with, they are only available within the add-in (or app) web. This is true for both SharePoint hosted and Provider Hosted add-ins. To make the content type available within your host web you could use ...


2

This worked for an announcements list. You need to write your code in 'OnPostRender'. Check the rendered DOM and modify the code in 'postRenderHandler' function if needed. Add the required html for displaying your icon. You might want to add some validations to make sure the code doesn't throw any errors. (function () { // jQuery library is required ...


2

A no JQuery solution for adding images to a ListView header There are lots of images available; Use https://github.com/purtuga/SPImages/ to browse the default _layouts/images folders var displayname='Due Date'; var el=document.querySelector("DIV[displayname='" + displayname + "'] A"); el.innerHTML = "<img src='/_layouts/images/ADDTOFAVORITES.GIF' />" ...


2

Definition of getQueryStringParameter should look like following. Check it in your App.js file. function getQueryStringParameter(paramToRetrieve) { var params = document.URL.split("?")[1].split("&"); var strParams = ""; for (var i = 0; i < params.length; i = i + 1) { var singleParam = params[i].split("="); if (singleParam[0] == ...


2

If I remember correctly. The first wsp file contains the information your app needs to create the App Web. It contains the information around things like the app web itself, any lists or libraries included in the add-in. The secondary wsp file is simply the package of your solution. Remember, a wsp file is basically just SharePoint's version of a cab ...


1

The distribution mechanism used by a SharePoint app to add pages and lists to the app web during installation is a standard solution package, which is a CAB file with a .wsp extension. The one difference is that the solution package used by the SharePoint app model to add files to an app web is not a stand-alone file. Instead, it is embedded as a .wsp file ...


1

I am going to go ahead an answer this to save some poor soul in the future. The problem was with the App Manifest file. I had the Permissions => Scope set to Site Collection. This needs to be changed to 'Web'.


1

You loading SP.js and SP.RequestExecutor.js in every call to baseSvc. That is not needed. Try following Load SP.js and SP.RequestExecutor.js in document ready Then initialize angular app Example $(document).ready(function() { var hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl")); var appweburl = ...


1

Make sure the author/editor field is displayed in the list view. Sometimes you might have to edit the web part and apply your view again after making changes to the view.


1

The reason you are seeing differences is that in the first part you are modifying/creating a view for the list. In the second you are adding in a list view web part to your page. When you add a list view web part it will go back to the default view. If you want to change it you can do so by going to the web part properties and selecting your view that you ...


1

The following example shows how to retrieve all of the files in a folder. url: http://site url/_api/web/GetFolderByServerRelativeUrl('/Folder Name')/Files method: GET headers: Authorization: "Bearer " + accessToken accept: "application/json;odata=verbose" or "application/atom+xml" Does this help? Source


1

Am I crazy or should you need Get, not Post? url: query, method: "POST", headers: {


1

Try This, Declare a Client context ctx and get your list/library name: RoleDefinition roleDef = ctx.Web.RoleDefinitions.GetByType(RoleType.Reader); RoleDefinitionBindingCollection roleDefBinding = new RoleDefinitionBindingCollection( ctx ); ctx.ExecuteQuery(); roleDefBinding.Add( roleDef ); CamlQuery query; query = ...


1

The SharePoint hosted app model, that you are referring to doesn't magically give the user more permissions than they already have, because if it did it would a be a security flaw, as you point out. Thus a SharePoint hosted app, will always use the current users permissions, as everything is run in the context of the users. On the other hand if you build ...


1

What you are looking for are called "Remote Event Receivers" and they are only available in Provider Hosted Add-Ins (https://msdn.microsoft.com/en-us/library/office/jj220043.aspx.) Given that SP Hosted Add-Ins can only use javascript that executes in the browser, there is no way to react to an OOTB event such as ItemUpdated. What you could do is implement ...


1

You have to add a RemoteEndPoint to your solution. In the appmanifest, go to the tab 'Remote End Points'and write the url where you need to consume the information


1

To resolve the error make sure that the account being used to run Visual Studio is a db_owner on the SharePoint config and SharePoint admin databases.


1

I am not sure about the performance, but my preferred approach would be to fire five CAML queries in parallel. That way you reduce the execution time by approx. 80%. You should also think about the frequency with which you need to get this data. Although 100 responses might not make much of a difference, for a larger number of responses and a frequency of ...


1

IMO, the fastest would be to get all responses for a given QuestionId: In both cases, you'll have to retrieve all items for the QuestionId. The total number of items is the same in both cases. So the traffic on the network will finaly be the same, as well as the the memory consumption. However, in the latter case (get all items and do the loop yourself): ...


1

This sounds like intermittent communication issues between the client and the server. When the client PC sees 'this page cannot be displayed', have you done any checks to see whether the client PC can ping the SharePoint server, or resolve the server over the network? If not, that would be the first place I'd start. Can the client PC see other sites on the ...


1

I found the hidden feature to enable on any site at on this post Enable Hidden Developer Site Feature


1

This was due to system resources: mainly on the db, search crawl topology was separated to new servers, this has solved the install issue.



Only top voted, non community-wiki answers of a minimum length are eligible