Related Item link is broken in DispForm.aspx for a task in Workflow Tasks list if file name contains “ ' “  (single quote)

Description:

We have created a custom workflow in Microsoft Visual Studio 2013 and SharePoint 2013. This Workflow is associated with a Document library.

This Workflow starts as soon as any new item is created OR updated in Document library and creates a Task in Workflow Tasks list.

 

 Related Item link is not working in following scenario -

 

  1. Upload a file that contains ' in its name, in a document library
  2. Navigate to Workflow Tasks list
  3. Open View Item form (DispForm.aspx ) of  Task Created by workflow then click on link in Related Item fields

 

OUPUT:

Related Item link  truncates after '

                                                                                                                                    

Eg.

Original Link: http://<Site URL>/Documents/te'st.txt

Related Item Field: http://<Site URL>/Documents/te

Is this known bug in SharePoint 2013 OR any hotfix available to fix it.

April 17th, 2015 3:01am

Hi,

As I tested per your description, I can reproduce the issue as well.

From what I have found out, it seems SharePoint resolve single quote into different code in different place. During the test, if I set Task Name to Document Name, single quote will be resolved to &#39; , if I set some field to Document encoded URL, single quote will be resolved to %27 . For now, I haven't found out any article talking about this issue.

As workaround, we may find out a way to change the Related Item field. However, it is OOB field in workflow task (SharePoint 2013) content type, and this content type cannot be modified in form.

I'd suggest you use Task as default content type in your task list, and add new column to get document url and place in the form in Task content type settings.

Regards,

Free Windows Admin Tool Kit Click here and download it now
April 20th, 2015 2:00am

Thanks Rebecca..

So, can we say that it is a bug in SharePoint 2013.

Also, I want to highlight few points here-

1. If I check List settings of Workflow Task list then only Task is set as default content type automatically.

2. When I Edit any task in workflow Task list, and select "Task" in content Type dropdown the Approve and Reject button disappears..I need Approve and Reject button in View Item page of a Task.

3. While using Task Activity in Visual Studio, by default workflow task (SharePoint 2013) is set. It does not allow to change content type. Is there any way to change content type in Task activit?

So I think using Task Content type will not solve the pupose. What is your view on this?


  • Edited by asharma123 38 minutes ago added one more point
April 20th, 2015 2:56am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics