Sharepoint task list and Outlook sync

[亡魂溺海] 提交于 2019-12-19 11:34:09

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/5546811/sharepoint-task-list-and-outlook-sync

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!