sharepoint-2010

How to Display Modified Time and Modified By Fields Correctly with Powershell

大憨熊 提交于 2021-02-11 07:21:41
问题 I have a script that outputs to CSV all items/files from all Lists and Libraries. In addition, it displays the current and previous versions of an item/file. This also displays which user modified the file for each version and also displays the date/time the file was modified for every version: function Get-DocInventory([string]$siteUrl) { $web = Get-SPWeb "http://contoso.com/sites/Depts3/HBG" foreach ($list in $web.Lists) { foreach ($item in $list.Items) { foreach($version in $item.Versions)

How to Display Modified Time and Modified By Fields Correctly with Powershell

别说谁变了你拦得住时间么 提交于 2021-02-11 07:21:26
问题 I have a script that outputs to CSV all items/files from all Lists and Libraries. In addition, it displays the current and previous versions of an item/file. This also displays which user modified the file for each version and also displays the date/time the file was modified for every version: function Get-DocInventory([string]$siteUrl) { $web = Get-SPWeb "http://contoso.com/sites/Depts3/HBG" foreach ($list in $web.Lists) { foreach ($item in $list.Items) { foreach($version in $item.Versions)

Text to Html conversion in Sharepoint 2010

人盡茶涼 提交于 2021-02-10 14:19:20
问题 I have a SharePoint 2010 list of around 198 items. For the first 30 items Text to Html Javascript function successfully converts text code to Html but when I am trying to select next 31 items and go ahead using the pagination the function does not able to convert Html and display only text codes. Does anyone please who have the code handy to make this work? Below is the code used in SharePoint 2010. Thank you. <script type="text/javascript"> function TextToHTML(NodeSet, HTMLregexp) { var

How to Limit the number of items that can be entered in a SharePoint List?

懵懂的女人 提交于 2021-02-08 11:50:50
问题 I am trying to limit the number of entries allowed on a SharePoint 2010 list . The list is for users to sign up to and we want to limit this to 60 for example. I have had a look at the similar questions but none of them seem to work. None of the validation formulas found so far have been appropriate. I would appreciate any advice and help on this . Thank you is advance ! :) 回答1: There's nothing built-in to allow you to accomplish this. However, if you present your own interface for creating

Sharepoint - Using C# to open a word doc file stored in Sharepoint document library

亡梦爱人 提交于 2021-02-08 03:28:13
问题 I'm coding using visual studio, C#. Like the above mentioned, is there any ways i can open a word file stored in Sharepoint's document library? Just have to open the word file for me to read. Do not have to edit or delete. I have tried: System.Diagnostics.Process.Start("iexplore.exe",url) but it doesn't seems to work. Tried the following codes. No problem displaying my label. But the word doc wouldn't launch as well. protected void GridView1_RowCommand(Object sender, GridViewCommandEventArgs

Uploading a file to sharepoint without a password

此生再无相见时 提交于 2021-01-29 08:01:42
问题 i am trying to upload a file to sharepoint with c# using the microsoft sharepoint client i have no issues when i create my context and give it my username and password like this using (ClientContext ctx = new ClientContext(spSite)) { if (!System.IO.File.Exists(fileLocation)) throw new FileNotFoundException("File not found.", fileLocation); var credentials = new NetworkCredential("username", "password"); ctx.Credentials = credentials; Web web = ctx.Web; ctx.Load(user); ctx.ExecuteQuery();

sharepoint 2010 foundation search not working

妖精的绣舞 提交于 2020-03-26 08:36:13
问题 I have installed SP 2010, but could not get the search to work. I have started search services, but it is still not working. Noticed that when I search I get: We did not find any results for .... Any ideas. thanks! 回答1: I have installed search server express 2010 on top of SPF. which works great. it has additional features and work well with sharepoint foundation. her is a link for upgrade and configuration: http://www.mssharepointtips.com/tip.asp?id=1086 You need to crawl the the contents

Javascript - How to hide a drop down control if it's empty

橙三吉。 提交于 2020-02-02 14:30:33
问题 I have a cascade dropdown on a form. User selects Document Type and most of the document type has Category. However, if a doc type does not have category then I would like to hide the category drop down. Is there a way to see if category dropdown (calculate array or something) and hide category control (by default it always show Select a value even if the drop down does not have any value to select from) So far I have following and wondering how to evaluate category drop down control based on

SPContext.Current.FormContext.OnSaveHandler not firing when SPControlMode is New

大憨熊 提交于 2020-02-02 06:28:57
问题 I've got a web part that I'm using to add some custom controls to the New, Edit and Display forms for a SharePoint ListItem. I added a handler for SPContext.Current.FormContext.OnSaveHandler to update the item. I add my web part to the Edit and New forms using SharePoint Designer and hide (set IsVisible=False) for the DataFormWebPart that's put in by default. Everything works fine when editing an item. My OnSaveHandler function is called and I update the SPListItem. The problem is with a new

SPContext.Current.FormContext.OnSaveHandler not firing when SPControlMode is New

邮差的信 提交于 2020-02-02 06:28:06
问题 I've got a web part that I'm using to add some custom controls to the New, Edit and Display forms for a SharePoint ListItem. I added a handler for SPContext.Current.FormContext.OnSaveHandler to update the item. I add my web part to the Edit and New forms using SharePoint Designer and hide (set IsVisible=False) for the DataFormWebPart that's put in by default. Everything works fine when editing an item. My OnSaveHandler function is called and I update the SPListItem. The problem is with a new