分配任务时指导用户编辑表单 [英] Direct user to Edit form when assigning a task

查看:84
本文介绍了分配任务时指导用户编辑表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

当我使用分配任务"功能时,我试图引导用户使用任务的编辑形式SharePoint Designer 2013中执行操作.由于某些原因,该ID在发送电子邮件时似乎不可用.但是这个 并没有什么意义,因为某种程度上可以使用任务URL"(显示形式),并且该URL必须包含ID以将用户带到正确的项目.

这是任务选项的屏幕截图:

源字段"中没有一个选项具有任务相关项目ID".好的,所以我将像在SP07中那样尝试老式的学校风格.因此,我尝试手动制作自己的链接到编辑表单,然后通过自己选择任务ID 添加或更改查找"按钮.我选择了任务"列表作为要从中获取数据的列表,并选择了ID作为要返回的字段,其中任务列表中的ID与应创建的TaskID变量匹配 创建此任务后.

不幸的是,这也会引起问题.此配置导致工作流因以下错误而挂起.

RequestorId:3a416983-eb99-9b0e-0000-000000000000.详细信息:在工作流实例的执行期间发生未处理的异常.异常详细信息:System.ArgumentNullException: 值不能为空.参数名称:System.Number.ParseInt32(String s,NumberStyles)处System.Number.StringToNumber(String str,NumberStyles选项,NumberBuffer& number,NumberFormatInfo info,Boolean parseDecimal)处的字符串风格, System.Activities.CodeActivity`1.InternalExecute(Microsoft.Activities.Expressions.ParseNumber`1.Execute(CodeActivityContext上下文)上的System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem上的NumberFormatInfo信息). ExecuteBody(ActivityExecutor 执行者,BookmarkManager书签管理器,位置resultLocation)

因此,当我尝试使用ID时,该值为null到底有多精确,但是任务属性-任务相关项URL"(包括ID)的选项就可以了.无法创建ID,因为尚未创建任务 但是,但是,Microsoft以某种方式能够在创建DisplayForm的URL时获得已知ID的魔力.

作为一个旁注,我知道此线程已经受到质疑解决方案

"[%Variable:TaskID%]"将在分配任务"之后设置为值动作完成.而且没有OOB方法可以从电子邮件正文中的"[%Task:URL%]"获取ID.

作为一种解决方法,我们可以为关联的工作流程任务列表创建工作流程.创建任务后,请发送一封包含以下内容的电子邮件: 路径 指向指定用户的路径.

最好的问候,

Linda Zhang


Hello,

I am trying to direct a user to the edit form of a task when I use the "Assign a task" action in SharePoint Designer 2013.  For some reason it seems that the ID is not available at the time of the email being sent.  However, this doesn't really make sense because somehow the Task URL (to the display form) is available, and the URL must include the ID to take the user to the correct item. 

Here is a screenshot of the task options:

None of the "Field from source" options have "Task Related Item ID".  Okay, so I'll try old school style like I did in SP07.  So I tried manually making my own link to the edit form and I selected the task ID myself through the "Add or Change Lookup" button.  I selected the Tasks list as the list I want data from, and I select the ID as the field I want returned, where the ID in the task lists matches the variable of the TaskID which should be created once this task is created.

Unfortunately this causes a problem as well. This config causes the workflow to suspend with the error below.

RequestorId: 3a416983-eb99-9b0e-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ArgumentNullException: Value cannot be null. Parameter name: String at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at Microsoft.Activities.Expressions.ParseNumber`1.Execute(CodeActivityContext context) at System.Activities.CodeActivity`1.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

So how exactly is it that the value is null when I try to use ID, but the option for Task Properties - Task Related Item URL (which includes the ID) is somehow fine.  I assume getting the ID isn't possible because the task hasn't been created yet but somehow Microsoft was able to pull off this magic where the ID is known at the time of creating the URL to the DisplayForm.

Just as a side note, I know this has already been questioned on this thread here.  However, the proposed solution of re-directing the DisplayForm to the EditForm is not the most elegant way of doing this.  Maybe there are times where certain properties of the task need to be displayed instead of forcing the user to the edit form every time.  Maybe some people don't like being redirected without their consent.

Does anyone know of a more elegant solution?

Does anyone agree that Microsoft really should allow us to use the task ID in the task emails?  In fact, maybe it would be nice to also have a Task Properties - Task Related Item URL (EditForm) and a Task Properties - Task Related Item URL (DisplayForm) for convenience.  (We were given the DisplayForm option, I just listed it for clarity on the suggestion).

Thanks,

Eric

解决方案

Hi Eric,

The "[%Variable: TaskID%]" will be set value after the "Assign a Task" action is completed. And there is no OOB method to get the ID from the "[%Task: URL%]" in the email body.

As a workaround, we can create a workflow for the associated workflow task list. When a task is created, send an email with the path to the assigned user.

Best Regards,

Linda Zhang


这篇关于分配任务时指导用户编辑表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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