Tag Info

Hot answers tagged

15

You can always add ?contents=1 to any url in SharePoint to see what specific webparts that are used in the site/page. Example: http: //test.sharepoint.com/Pages/default.aspx?contents=1


14

This seems to be pretty close in performance: context.Load(lists, all => all .Where(l => l.RootFolder.Name == "MyListUrl") .Include(l => l.Id)); context.ExecuteQuery(); list = lists.Single(); If you need to get this by server-relative url you would need to parse the web url and list url first.


11

Yet another version to load List by server relative Url using CSOM. The solution consists of the following steps: Retrieve list Folder object using Web.GetFolderByServerRelativeUrl method Retrieve List by specifying List ID stored in vti_listname property from Folder.Properties object Code: static class WebExtensions { /// <summary> /// ...


10

If you export the web part and locate the JSON string that contains the "refinerConfigurations" you can change the "useDefaultDateIntervals":false and then set your own intervals like "intervals":[-365,-180,-30,-7,-1]. Dates in the past are negative and the future are positive. If you don't know how to export and import a web part let me know and I'll add ...


9

Works with double ' _api/Web/Lists/GetByTitle('St. John''s Calendar')/


9

I would suggest you create different content type or use the tagging feature to organize the items. Check this for the list of Pros and Cons http://social.technet.microsoft.com/wiki/contents/articles/16166.sharepoint-2013-using-folders.aspx Folder vs Metadata SPS 2013 search makes it easy to find worthwhile files and list items with or without any added ...


9

Queries will be executed based on the logged in users context. The results will be security trimmed. Also you should note that there is no option to elevate privileges from Client Side. This was done to eliminate security risks. Talking about app's (which can use REST queries), we can elevate the permissions. But this permission is maximum limited to the ...


9

Me in a Calculated Column I do not understand why you want [Me] in a Calculation. You can use [Me] in de View Filter settings Like the [Created By] and [Modified By] Columns and Lookup Columns [Me] is not available for Calculated Columns as the textual information is not stored in the List Item. I presume its legacy behaviour. Although with todays ...


8

It does not seem possible to filter list items using FileSystemObjectType property in SharePoint 2013 REST. Option 1 But you could utilize the following REST query to return folders and associated list items: /_api/web/lists/Lists(guid'GUID')/rootFolder/Folders?$expand=ListItemAllFields JavaScript example var listTitle = "Documents"; var url = ...


8

You should reduce it, and your farm will get benefit from it. Their is no impact rather you will get performance improvement. NodeRunner.exe is resource hungry process. their 3 step process: Use Set-SPEnterpriseSearchService -PerformanceLevel Reduced to reduce the CPU impact the search service Modify the C:\Program Files\Microsoft Office ...


7

SP 2013 uses clienttemplates.js to create the those views control. You can either create a JSLink or add the following script using the script Editor webpart to the page where your list view resides. <script type="text/javascript"> ExecuteOrDelayUntilScriptLoaded(overrideSurfacePivotCount, 'clienttemplates.js'); function overrideSurfacePivotCount() { ...


7

For those who are still looking for the answer. SharePoint 2013 (since SP1 at least see UPD below) contains special method Web.GetList. It accepts site-relative url for the list, i.e. site/dev/lists/mylist. Sample code for .NET object model: var ctx = new ClientContext("http://sp2013dev/sites/dev"); var list = ...


7

With this specification, it is not possible to install SharePoint on it. You can try: Office 365 (SharePoint Online) 90 day free trail of windows azure. check this


7

properties.Status = SPEventReceiverStatus.CancelNoError; OR .CancelWithError


7

You can use $SubWeb.Site.RootWeb


7

Getting only the current user won't be enough to get user profile properties. You need to use the PeopleManager as well. Your code should look something like this: var context = SP.ClientContext.get_current() var web = context.get_web(); var user = web.get_currentUser(); var peopleManager = new SP.UserProfiles.PeopleManager(context); var personProperties = ...


7

John is more or less right, but you need to use SP.KeyValue afaik: 'properties': { '__metadata': { 'type': 'SP.Utilities.EmailProperties' }, 'From': from, 'To': { 'results': [to] }, 'Body': body, 'Subject': subject, "AdditionalHeaders": {"__metadata": ...


6

I got this error when trying to do Restore-SPSite on a SharePoint Farm that did not match the schema version of the backed-up Site Collection. After installing the correct CU to my target environment the Restore-SPSite worked without issues. Found this in the ULS log to pinpoint the issue : Microsoft.SharePoint.SPException: Schema version of backup ...


6

How to filter by lookup field value using SharePoint REST Assume a Contacts list that contains a lookup field named Province Option 1 When a lookup column is being added into list, its ID become accessible automatically via REST. For example, when the field named Province is added into List, Province Id could be set or get via ProvinceId property of List ...


6

I normally follow as below SP.SOD.executeFunc('sp.js', 'SP.ClientContext', readyFunction); function readyFunction() { getCurrUser(); evalGroups(); getDeptMgrs(); getItemOwner(); } Its more readable!


6

If you are referencing an external file using CEWP then it works. But if you try to add a script block directly inside the webpart content, then it will not work. SharePoint removes all the script from Content Editor web part. Use Script Editor web part instead. Another difference is, Content Editor web part can be exported and script editor web part ...


6

If you have an MSDN Premium subscription, you will be able to set up a development environment using VMs and you should also be able to sign up for a 1 year free Office 365 developer account. In addition to the Core Solutions jumpstart that Amal linked to there is also the one for the Advanced Solutions as well. You also should absolutely get a PluralSight ...


6

Farm Solutions (Full Trust): Develop for SharePoint On-Premises only. Can use managed code and the Server Object Model. This model has been around since SharePoint 2007 and is currently the most robust and well documented. Sandbox Solutions: Develop for SharePoint On-Premises or SharePoint Online. Can currently use managed code and a limited version of the ...


6

http://server/sites/site1 is a different site collection. Go to the central administration. Select the site collection under the web application and add the account in its list of administrators.


6

The master pages and page layouts are stored at site collection level and in master page gallery _catalogs/masterpage. But you can always have liberty to select different master page for each sub site or also inherit the master page from its parent which is a site collection. Webapplication won't have any master page for itself without a root site ...


6

It might look like a property, but actually the setter of that property calls a method named SetAllowUnsafeUpdates(value) which code is as follows: private void SetAllowUnsafeUpdates(bool allowUnsafeUpdates) { this.Request.SetIgnoreCanary(allowUnsafeUpdates); } SetIgnoreCanary sets to ignore Canary (Canary is something that refers to a method of buffer ...


6

CSOM and REST was introduced in SP 2010 so you wont be able to use that with 2007. SOM is an option but requires that your code runs on the servers of each farm. SharePoint Web Services will be your best option if you need to support all three versions with the same code from client computers. Lists Web Service (/_vti_bin/Lists.asmx) for getting libraries ...


6

The simple process of setting item level permission is not available for SharePoint 2013 workflows. The only way I was able to do was through REST api called under Appstep. There are 2 calls made: BreakRoleInheritance AddRoleAssignment This blog by Yuri Leontyev​ ​ over at spssite.pro can be a good start. Excerpt: BreakRoleInheritance​ ...


5

Batching is now supported in REST O365 only. You can check out a javascript library on GitHub that batches these for you using the new capabilities. https://github.com/SteveCurran/sp-rest-batch-execution


5

Depending whether taxonomy field is single-valued or or multi-valued use the corresponding method: single-valued taxonomy field: SP.Taxonomy.TaxonomyField.setFieldValueByValue by specifying SP.Taxonomy.TaxonomyFieldValue object multi-valued taxonomy field: SP.Taxonomy.TaxonomyField.setFieldValueByValueCollection Method by specifying ...



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