Sharepoint 任务列表和 Outlook 同步 [英] Sharepoint task list and Outlook sync

查看:83
本文介绍了Sharepoint 任务列表和 Outlook 同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Sharepoint 任务列表与 Outlook 同步.当用户将任务列表连接到 Outlook 时,所有用户的任务都在 Outlook 中可见.除了在 Outlook 中应用过滤之外,我是否可以在源本身提供过滤?我的应用程序有相当多的用户,要求所有用户自己应用过滤器是不好的.

I am trying to sync Sharepoint task list with Outlook. When the users connect the task list to outlook, the task for all users are visible in outlook. Rather than applying filtering in Outlook, can I provide a filtering at the source itself? There are considerable number of users for my application, it wouldn't be good to ask all users to apply filters on their own.

还有其他建议吗?

谢谢.

推荐答案

我问了同样的问题:仅将 Outlook 列表与当前视图中的项目同步..在这种情况下,可以使用 stssync 协议来做任何你想做的事情.这需要很多努力(幸运的是有人已经写了一个实现)

I`v asked the same question: Sync list with outlook only with items in current view.. In this case it was possible to use stssync protocol to do whatever you want. It takes much effort (luckily someone already wrote an implementation)

但是我最终使用了另一种解决方案 - 为 Lists.asmx 网络服务实现一个包装器并重写 Outlook 请求(通过使用自定义 Global.asax 文件)以使用这个新的网络服务而不是 Lists.asmx,它只查询特定视图在列表中.

But there was another solution i ended up using - implementing a wrapper for Lists.asmx webservice and rewriting outlook requests (by using custom Global.asax file) to use this new webservice instead of Lists.asmx, that only queries specific view in a list.

if (ctx.Request.UserAgent.Contains("Microsoft Office Outlook") && path.ToLower().IndexOf("_vti_bin/lists.asmx") >= 0)
            {
                ctx.RewritePath("/_layouts/OutlookLists.asmx");
            }  

我不确定您是否需要这样的解决方案.如果你这样做,你可能会问,我可能会发布网络服务的解决方案源,但是我自己不再使用这个网络服务了.您可以将其用作草稿,而不是可用于生产的代码.

I'm not sure you would want a solution like this. If you do, you may ask and i may publish the solution source for the webservice, however i'm not using this webservice myself anymore. And you could use it as a draft, not a production ready code.

源代码已在 CodePlex 上发布.

The source has been published on CodePlex.

我不知道为什么列表 ID 没有被视图 ID 替换.我尝试在脚本控制台中运行该功能(IE8/9 为 F12)

I don't know why list id isn't being replaced by view id. I tried to run the function within script console (F12 for IE8/9)

>> var menuItems = document.getElementsByTagName('ie:menuitem');
for (var i = 0; i < menuItems.length; i++) {
        itm = menuItems(i);
        if (itm.id.match('OfflineButton') != null) {
            console.log('listName:' + ctx.listName.toLowerCase() + 'viewName:' + ctx.view.toLowerCase());
            if (ctx != null && ctx.listName != null && ctx.view != null) {
                console.log('Inside if block');
                //Replace listId to viewId being used so outlook will query only items in current view.
                //Must have custom web service in place to handle that request, because it iwll not work OOTB.
        console.log("Before: " + itm.onMenuClick);
                itm.onMenuClick = itm.onMenuClick.replace(ctx.listName.toLowerCase(), ctx.view.toLowerCase());
        console.log("After: " + itm.onMenuClick);
                break;
            }
        }
    } 
LOG: listName:{fe89e809-7de4-4f43-9bc2-7e8ce6624ed0}viewName:{7364a843-c7f2-47d8-b4a3-5dc7381b6248} 
LOG: Inside if block 
LOG: Before: javaScript:ExportHailStorm('tasks','https:\u002f\u002fserver\u002fsapulces\u002fdarbu_parskata','{fe89e809-7de4-4f43-9bc2-7e8ce6624ed0}','Uz\u0146\u0113muma darbu p\u0101rskata sapulce','Uzdevumi','\u002fsapulces\u002fdarbu_parskata\u002fLists\u002fUzdevumi','','\u002fsapulces\u002fdarbu_parskata\u002fLists\u002fUzdevumi'); 
LOG: After: javaScript:ExportHailStorm('tasks','https:\u002f\u002fserver\u002fsapulces\u002fdarbu_parskata','{7364a843-c7f2-47d8-b4a3-5dc7381b6248}','Uz\u0146\u0113muma darbu p\u0101rskata sapulce','Uzdevumi','\u002fsapulces\u002fdarbu_parskata\u002fLists\u002fUzdevumi','','\u002fsapulces\u002fdarbu_parskata\u002fLists\u002fUzdevumi'); 

如您所见,函数参数(第三个)已被替换为视图 ID 而不是列表 ID.

As you can see, the function argument (third one) has been replaced with a view id instead of list id.

不要忘记在部署前删除 console.log 语句,因为如果 IE 没有 Web 开发人员工具,javascript 会在那里崩溃.

Don't forget to remove console.log statements before deploying, because if IE doesn't have web developer tools, javascript will crash there.

这篇关于Sharepoint 任务列表和 Outlook 同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆