sharepoint-2010

Unable to retrieve file information from SharePoint library using Client Object Model

放肆的年华 提交于 2019-12-24 04:56:35
问题 I am trying to read some attributes from a file in SharePoint 2010 library using client object model. Here is the sample using SP = Microsoft.SharePoint.Client; SP.ClientContext clientContext = new SP.ClientContext( "http://path/to/the/site" ); clientContext.Load( clientContext.Web ); clientContext.ExecuteQuery(); SP.File spFile = clientContext.Web.GetFileByServerRelativeUrl("/TestLibrary/sample.pdf"); clientContext.Load(spFile); clientContext.ExecuteQuery(); //here we'll catch exception But

How can I set a User field to a default value of a user currently logged in through XML in Sharepoint 2010?

半城伤御伤魂 提交于 2019-12-24 02:55:11
问题 I'm trying to create an field definition in XML for a field of a User type and need to set its default value to a user currently logged in. How do I do that? Thanks a lot in advance. 回答1: Here is the closest I've ever come: <Field ID="{99ced9dc-5715-47a7-9ede-1733f027eeb4}" Name="MyField" DisplayName="My Field" Type="User" List="UserInfo" UserSelectionMode="PeopleOnly" Required="TRUE"> <DefaultFormula>=";#"&Me</DefaultFormula> </Field> It doesn't blow up, but it doesn't give the desired

Set Folder Permissions

送分小仙女□ 提交于 2019-12-24 02:54:06
问题 I have the following code which works fine when creating folders: public void CreateFolders() { _SharePoint.ClientContext _ClientContext = new _SharePoint.ClientContext("https://sharepoint.oshiro.com/sites/oshirodev/"); _ClientContext.Credentials = new NetworkCredential("user", "pass", "oshiro.com"); var _web = _ClientContext._web; var _Root = _web.Lists.GetByTitle("Library1"); var _folder1 = _Root.RootFolder.Folders.Add("Folder1"); var _subfolder1 = _folder1.Folders.Add("SubFolder1");

How to make text box appear when hover over on the image map?

不羁的心 提交于 2019-12-24 01:52:56
问题 I am trying to make a text box appear when hover over hotspot on image map. This is what I did to make text to appear when I hover over. <p class="ms-rteFontSize-3"><map name="FPMap0" id="FPMap0"> <area title="Click to view" href="http://google.com" shape="rect" coords="26, 106, 133, 237"/> <area title="Click to view" href="http://yahoo.com" shape="rect" coords="322, 113, 414, 250"/> <area title="Click to view" href="http://ask.com" shape="rect" coords="402, 35, 488, 96"/> <area title="Click

How to sync e-mail outlook2010 and sharepoint2010

你离开我真会死。 提交于 2019-12-23 16:23:35
问题 I need to sync emails between outlook2010 and sharepoint 2010. I have been searching, but found syncing contacts, calendars and tasks. Links and examples will be appreciated. Question: What is the best way to achieve this? 回答1: Take a look at the Sharepoint webpart OWAInboxPart which will display email from Exchange without having to store the emails within Sharepoint. 回答2: The question is Why? Outlook is a communication tool not a storage facility. There is an outlook web parts in SharePoint

Highcharts don't render in Internet Explorer 11

你说的曾经没有我的故事 提交于 2019-12-23 16:10:59
问题 I am making a dashboard in a Sharepoint html page. My charts render and display correctly in Chrome, but only the pie chart renders in Internet Explorer 11. If I create a static array of data for the series, it works. If I try to populate it dynamically, it only works in the pie chart. <script type="text/javascript"> $(document).ready(function() { Date.dateDiff = function(datepart, fromdate, todate) { datepart = datepart.toLowerCase(); var diff = todate - fromdate; var divideBy = { w:

How to close SP.UI.ModalDialog from button click in sharepoint?

南楼画角 提交于 2019-12-23 09:36:15
问题 I want to show Confirmation Dialog when user saves any document from EDITForm.aspx. So I have written following JavaScript code. function PreSaveAction() { var _html = document.createElement(); _html.innerHTML = " <input type=\"button\" value=\"Submit\" onclick ='javascript:SubmitDlg();' /> <input type=\"button\" value=\"Cancel\" onclick =\"javascript:CloseDlg();\" /> </td> </tr> </tbody> </table>"; var options = { title: "Confirm", width: 400, height: 200, showClose: false, allowMaximize:

Visual Studio Unexpectedly Adding Feature on Load

有些话、适合烂在心里 提交于 2019-12-23 09:18:35
问题 I have a SharePoint 2010 solution in Visual Studio 2013. Every time I close and reopen Visual Studio, a new feature is added to the solution with one list inside it. The list was removed from another feature that it should be in. It is always the same list. As soon as I open the solution this pops up in the Output window before I do anything... A new feature Feature2 has been added to the project Solution C:\Code\Solution\Package\Package.package (0,0): Added Feature2 to Package What is

ASPMenu in Safari 7.1 Not Rendering Properly in SharePoint 2010

淺唱寂寞╮ 提交于 2019-12-23 07:49:27
问题 Has anyone else encountered an issue with the newest release of Safari 7.1 on Mac and iOS8 that breaks an ASPMenu control within SharePoint 2010? The ASPMenu worked fine before hand, but now after the update it has decided to render the contents incorrectly. I've tried setting the Page.ClientTarget = "uplevel", as well as modify the compat.browser file to include the adapter "System.Web.UI.WebControls.Menu" for Safari, but neither option is helping fix the issue. Can anyone help? The menu

Can't find workflow deployed as WSP solution (when I deploy it from VS it works)

烈酒焚心 提交于 2019-12-23 04:51:09
问题 I am new to SharePoint, sorry if answer to my question is obvious. I am trying to deploy my very simple workflow as WSP package, it deploys without errors, I activate it, but I can't find my workflow and associate it with list. Could you help me, please, what I do wrong? I do it so: Create empty project Choose trust level as a Farm solution Add State Machine Workflow Choose list Workflow Associate workflow with list Task Create simple workflow Press CTRL-F5 in VS2010, and see that WF appears