Sharepoint 任务列表和 Outlook 同步

发布于 2024-10-30 09:29:35 字数 179 浏览 9 评论 0原文

我正在尝试将 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.

Any other suggestions?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

离不开的别离 2024-11-06 09:29:35

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

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

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

我不确定您是否需要这样的解决方案。如果您这样做,您可能会问,我可能会发布该 Web 服务的解决方案源,但我自己不再使用该 Web 服务。您可以将其用作草稿,而不是生产就绪的代码。

源代码已发布在 CodePlex 上。

关于脚本问题,

我不知道为什么列表 id 没有被视图 id 替换。我尝试在脚本控制台(对于 IE8/9 为 F12)中运行该函数

>> 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。

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

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)

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.

The source has been published on CodePlex.

Regarding to the script problem

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'); 

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

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

Spring初心 2024-11-06 09:29:35

这些任务是从工作流程创建的吗?这是 SharePoint 2007 的一个已知问题。

http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/64b3b124-085c-4d8e-8e85-8bd20736e0e7

http://blah.winsmarts.com/2007-4-SharePoint_2007__Fine_grained_permission_control.aspx

您可以尝试将读取/编辑权限设置为“仅限他们自己的”,但是我认为这会破坏工作的批准/警报

我相信问题已在 SharePoint 2010 中解决,我认为创建任务时每个任务都有细粒度的权限。

Were these tasks created from a workflow? this is a known issue with SharePoint 2007.

http://social.technet.microsoft.com/Forums/en/sharepointadmin/thread/64b3b124-085c-4d8e-8e85-8bd20736e0e7

http://blah.winsmarts.com/2007-4-SharePoint_2007__Fine_grained_permission_control.aspx

You could try setting the read/edit permissions to "only their own", but i think that breaks approval/alerts from working

I believe the problem is fixed in SharePoint 2010, i think tasks get created with fine-grained permissions per task.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文