zoukankan      html  css  js  c++  java
  • 分配一个Task给多人或多个群组

     

    1 在Task列表中增加定制列ApprovalPersons,设置为People and Group类型,并允许多选。

    2 拖放onTaskCreated动作在CreatTask之后,并在其事件中执行如下

    SPList taskList = workflowProperties.TaskList;
                SPListItem taskItem = taskList.GetItemById(afterProps.TaskItemId);

                SPUser user;
                SPFieldUserValueCollection fuvc = new SPFieldUserValueCollection();

                string[] users = new string[] { "cts\\246373", "cts\\234337" };

                foreach (string loginName in users)
                {
                    user = workflowProperties.Web.EnsureUser(loginName);
                    fuvc.Add(new SPFieldUserValue(workflowProperties.Web, user.ID, user.Name));
                }

                taskItem["ApprovalPersons"] = fuvc;
                // note this causes onChanged event called
                taskItem.SystemUpdate(false);

  • 相关阅读:
    iOS,Layer
    iOS 手势冲突
    ECharts
    手动安装Package Control
    webstorm配置svn详解
    js 对象 类型转换
    google 跨域解决办法
    关于内层DIV设置margin-top不起作用的解决方案
    图片与文字在div里实现垂直水平都居中
    css3之3D翻牌效果
  • 原文地址:https://www.cnblogs.com/mingle/p/2308222.html
Copyright © 2011-2022 走看看