sharepoint

Get username from SharePoint User field in List

橙三吉。 提交于 2020-01-22 10:04:46
问题 I have a custom sharepoint workflow that I'm developing in Visual Studio. The workflow is running against a document library which has a custom content type connected to it. The content type includes a user lookup field ("owner"). I'm trying to have my workflow assign a task to the "owner" lookup field. However, I've only been able to get the display name for the user, not the account username. Can anyone help? 回答1: Refer to this Article on how to get the User Details from the Field. public

How to generate a WSDL file from a C# webservice

旧时模样 提交于 2020-01-22 05:45:25
问题 I've created a WebService like this: [WebService(Namespace = "http://ns")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class GroupManagerService : WebService { public GroupManagerService() { } [WebMethod] public bool MyMethod(string loginname, string country) { // code here... } } Is it possible to generate a WSDL file for this code without connecting to a running service? I searched and I found information about SvcUtil.exe & wsdl.exe , but these work only when

Access Sharepoint list using client Id and Client secret in asp.net C#

*爱你&永不变心* 提交于 2020-01-21 10:15:35
问题 Currently, I'm able to access sharepoint list using user id and password as given below. But would like to understand on how can i access the list using Client Id and Client secret ? string siteUrl = "https://xyz.sharepoint.com/sites/MyList/"; ClientContext clientContext = new ClientContext(siteUrl); string username = ConfigurationManager.AppSettings["username"]; string password = ConfigurationManager.AppSettings["password"]; System.Security.SecureString passWord = new System.Security

SharePoint 知识总结

只谈情不闲聊 提交于 2020-01-21 03:42:47
  知识点总结 目录 获得 List 初始上传,还没有 Check In 过的 File 删除 SPListCollection 转 Datatable Folder 类型添加自定义属性 多行文本取出换行 识别为垃圾邮件 使用 MOSS 自带的方法发送 email .net 方式发送 email 更新审批状态 string 转 Guid Content Type 显示个人信息 长时间操作,不超时 转向 内容类型 AD 操作 List 附件的读取 模拟用户代码 People Editor 控件 工作流历史记录表 AJAX 实现 当 Person or Group 字段允许多人时,通过 sdk 对象读取用户信息 代码启动工作流 CAML 查找 Lookup 型 WEB 页面显示 word 多文件上传 工作流中权限 检查权限 添加权限 无法查询文件夹下的 item ,只能查找根目录的解决办法: 如何从 SPAttachmentCollection 中获取到 SPfile 如何查看 SharePoint 未知错误 Webpart 出错,无法打开页面, contents=1 , 会转到 webpart 管理页面,把出问题的删掉 在 URL 后面加入“ ?&toolpaneview=2 ”打开设计页 或者加“ DisplayMode=Design” http://Site/_layouts

sharepoint 知识点

蓝咒 提交于 2020-01-21 03:40:36
SPListCollection转Datatable SPListItemCollection unprocessedItems = List.GetItems(query); DataTable dt1 = unprocessedItems.GetDataTable(); Folder类型添加自定义属性 mySite = new SPSite(" http://richsql/ "); myWeb = mySite.RootWeb; SPDocumentLibrary spDoc = myWeb.Lists["JackDocuments"] as SPDocumentLibrary; SPContentTypeCollection spcontents = spDoc.ContentTypes; string strCTName = string.Empty; foreach (SPContentType spContextType in spcontents) { if (spContextType.Name == "Folder") { spContextType.Sealed = false; spContextType.Update(); } } Sealed 属性设置成false就可以了. 多行文本取出换行 Replace(""r"n", "<br/>")

配置Project Server 2003

空扰寡人 提交于 2020-01-21 00:14:46
安装的时候,应该还算是比较顺利。 但是后来,与sharepoint 连接的时候,从project assess web连接到sharepoint 网站时没有问题。 但是,当我登录到sharepoint站点,想同步project server 数据时,总是会出现这样的错误:“project server 连接到project server数据库更新失败。” 研究了两天,觉得应该还是project server与数据库连接时出现问题。 期间,将project server 卸载了一次,又重装。最奇怪的是,重装以后立即连接居然连上了,但重起以后仍然提示失败。郁闷ing。 来源: https://www.cnblogs.com/AmyLiu/archive/2006/06/22/432502.html

Learning sharepoint, can I setup a dev enviornment? Book recommendations?

女生的网名这么多〃 提交于 2020-01-17 07:59:31
问题 I want to learn sharepoint, can someone give me a quick overview of the various core things to learn in sharepoint? Is it a single installation of a product or does it have various components to it that have to be installed separately? Is there a book that you could recommend that would be the idea first book? 回答1: MSDN is great place with a lot of information about SharePoint development and Inside Microsoft SharePoint 2010. 回答2: If you plan to develop custom solution (programming) the good

get number of comments in yammer feed

白昼怎懂夜的黑 提交于 2020-01-17 02:21:16
问题 I am trying to get the number of comments for a yammer feed. I used the below query jQuery.getScript("https://c64.assets-yammer.com/assets/platform_js_sdk.js",function(){ console.log("script loaded"); var commentCnt = 0; yam.platform.request( { url: "https://www.yammer.com/api/v1/messages/open_graph_objects/"+ogID+".json" , method: "GET" , data: {"body": "This Post was Made Using the Yammer API. Welcome to the Yammer API World."} , success: function (msg) { if (msg) { jQuery.each(msg.messages

SharePoint Online 开发篇:SharePoint Hosted Apps获取用户ID

我的梦境 提交于 2020-01-17 00:39:58
Blog链接: https://blog.51cto.com/13969817 我们使用SharePoint Hosted App获取用户ID时,你将发现SharePoint中的JavaScript Object Model(JSOM)比REST API更容易使用。 REST Protocol的第一个限制是它只返回100个条目,我还没有找到一个方法来增加这个,而使用JSOM可以获取所有用户的列表,并按照ID 排序。 比如我们需要list来保存User ID,然后分别使用REST API和JSOM获取用户列表的代码。 使用REST API来获得用户的列表,并按ID排序,Sample Code如下: function getUsers() { var pUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/site/rootweb/lists/getByTitle('User Information List')/items?$orderby=Id"; //var pUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/site/rootweb/lists/getByTitle('User Information List')/items?$orderby=Id&$select=Id,Title

SP 2007 - Webpart cannot be displayed

你。 提交于 2020-01-16 21:58:51
问题 Error: "A Webpart on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe" Trying to find the details of this error in source-code but not quite sure where the exact problem is located. refer to This Thread for previous fixes performed. Any pointers on a good location to start? DLL: TCBOE.ChartPart.dll Namespace: TCBOE.Chartpart FeatureReceiver.vb Private Shared Sub AddOrRemoveChartHandlerToWebConfig(ByVal web As SPWebApplication, ByVal remove