sharepoint-2010

How to download newest file from SharePoint using PowerShell

大城市里の小女人 提交于 2019-12-23 04:33:53
问题 I'm just curious, do I have any possibility to download the file from SharePoint document library? The problem is that I have like 3-4 files in this library and I need to get the file with the latest modification date. Thank you in advance. 回答1: Refer to the link below, but instead of using the actual SharePoint URL for the directory use the File Explorer address for the SharePoint site. Powershell Script: $dir = "\\sharepoint.domain.com\site\Foo\SubFoo\SharedDocuments\Folder\" $latest = Get

SharePoint 2010: Set field value from query triggered by choice box selection

别来无恙 提交于 2019-12-23 04:30:56
问题 How do you link a form field to a choicebox selection so that the field's value is set by the information referenced by the ID of the choicebox selection? I have a choicebox in a custom list form which is bound to a "Client" list which contains client names, IDs, reference numbers, addresses, etc. The choicebox displays the client name and has the selected value set to ID. I would then like to query the Client list by the selected ID to populate form fields with Client Name, Client Address,

SharePoint 2010: Set field value from query triggered by choice box selection

夙愿已清 提交于 2019-12-23 04:30:32
问题 How do you link a form field to a choicebox selection so that the field's value is set by the information referenced by the ID of the choicebox selection? I have a choicebox in a custom list form which is bound to a "Client" list which contains client names, IDs, reference numbers, addresses, etc. The choicebox displays the client name and has the selected value set to ID. I would then like to query the Client list by the selected ID to populate form fields with Client Name, Client Address,

Opening an Excel document from SharePoint using PowerShell

我是研究僧i 提交于 2019-12-23 04:20:17
问题 I'm trying to open an Excel workbook from SharePoint using PowerShell. I'm not loading the SharePoint snap-in—I do not have it. When PowerShell tries to launch the workbook, SharePoint prompts for credentials. The problem is that we're trying to schedule the script, and we would like the script to have an SSO-like experience. Here's the MWE: $Excel = New-Object -ComObject Excel.Application $Workbook = $Excel.Workbooks.Open(http://site/file.xlsx) $Worksheet = $Workbook.Sheets.Item(

Performance issues with SharePoint and Telerik RadGrid Control

亡梦爱人 提交于 2019-12-23 03:21:25
问题 I originally posted this question to narrow down the slowness issues with my SharePoint application. After accepting StriplingWarrior's answer, I began to step through his suggestions. In a nutshell, I have a RadGrid within an Application Page hosted on a SharePoint 2010 Server. The RadGrid runs perfectly fine when paging; however, once a filter is applied, ex: give me last names that contain 'doe' (using Telerik's built-in filter mechanism), the results take upwards of 15 seconds to return.

Adding a new navigation node to sharepoint 2010 Top Navigation

六月ゝ 毕业季﹏ 提交于 2019-12-23 02:22:20
问题 I am trying to add a new navigation node to Top Navigation bar in my sharepoint website and I am using the following code: public void AddNavigation(SPWeb web, String url, string module, string key) { var resourceFile = "$Resources:" + module + "," + key; UnregisterGlobalNavigationLink(web, url); SPNavigationNode node = web.Navigation.GetNodeByUrl(url); if (node != null && overrideGlobalNavigationSetting) return node; node = new SPNavigationNode(resourceFile, url); node = web.Navigation

SharePoint 2010 Search Result file icon change

混江龙づ霸主 提交于 2019-12-23 01:13:47
问题 I am trying to change the aspx file icon from default icon to customized icon. I edited the xsl of the results.aspx page "fetched properties" for this section. I wanted to make sure that LegalDoc16.gif icons are displayed for the items who has "LegalDocument" content type. Please let me know if I dont have to syntaxed properly configured. I can do a search like ContentType:"legaldocument" and I get all the documents. so I know contenttype metadata property is being pulled. Please suggest.

HttpClient 4.2.3 using both SSL encryption and NTLM authentication fails

对着背影说爱祢 提交于 2019-12-23 01:12:46
问题 I am trying to use a REST call to Sharepoint 2010 via HTTPClient 4.2.3 from a Liferay 6.1 portlet. I have imported the cert into my local MAC's JVM cacerts and am trying to load the cacerts as the keystore. My code is: String opsCalendarURL1 = "https://hostname/sites/team-sites/operations/_vti_bin/owssvr.dll?"; String opsCalendarURL2 = "Cmd=Display&List={6E460908-D470-4F8A-AF76-CC279E25E0B1}&XMLDATA=TRUE"; String opsCalenderURLEncoded = opsCalendarURL1 + URLEncoder.encode( opsCalendarURL2 ,

SharePoint 2010 Document library versions comment

心已入冬 提交于 2019-12-22 18:22:06
问题 I would like to force users to add their comments before checking-in document. When a user selects Check-in, the default popup page will show in order to select version and write comments, but comments field is not mandatory, can we make it as a required field?? 回答1: You could do it via EventReceiver: public class EventReceiver1 : SPItemEventReceiver { public override void ItemCheckingIn(SPItemEventProperties properties) { base.ItemCheckingIn(properties); string comment = (string)properties

Removing all but one item from Controls [duplicate]

拥有回忆 提交于 2019-12-22 17:52:11
问题 This question already has answers here : How do I loop through items in a list box and then remove those item? (8 answers) Closed 6 years ago . I currently have a Sharepoint 2010 web part which includes several labels. I want to programmatically remove all but one of these labels. I tried the code below but got a System.InvalidOperationException because obviously one can't modify a collection while iterating through it. However, I don't know how else to try this. private void clearLabels() {