#SharePoint, Solving Open this task problem in Outlook

When you make an Approval Workflow for any document library, the regular scenario is sending the approval details via an email, SharePoint compatible with Outlook adds a button which know as Open this task button, the below image is exactly what you receive when a task assigned to you from the approval workflow:

But unfortunately when clicking this button for completing the task, we have like the below error:

After few searching for this error I have to know the suggested reasons for it:

  1. The form template is not available.
  2. The form template cannot be downloaded from the site.
  3. The form template was not sent in the e-mail message.
  4. The form template was not published to a shared location.

And the suggested resolution is to add the URL for the form template to your trusted sites or local zone and ensure that the person has ‘Contribute’, the minimum permissions required to update InfoPath forms.

But no way L, I have tried all the known solutions without good results, my suggestion to the error is due to cross domain, and LB failures, but the hope is that we have a workaround solution, which also gives more power to the workflow mail actions, as the OWA don’t give you the option of (Open this task) button through web, you must have Outlook.

The Solution is easy, when you make your approval workflow, click on Approval Action to edit it like below:

You will have four options to edit the Action, click change the behavior of a single task like below:

It will give you the detailed steps for the approval process, search for any email sending actions like below:

Then click each one to edit its content, we are going to add the Open task as a link inside the email body, type any text you want for example (Open this task), then click on the Hyper link button in the right corner of the email defining screen like below:

It will open a screen for editing the link, in the Address section click on the String Builder button like below in step (1), then click the Add or Change Lookup button like below in step (2), then in the Data Source section dropdown the list and choose Workflow Context, then in the Field from source section Choose Current Site URL like below in step (3), then O.K to save changes in all windows:

 

Then the String Builder will be like below, add the following URL snippet behind the added Context (/WorkflowTasks/DispForm.aspx?ID=):
Where (WorkflowTasks) is the name of the current workflow Task list, and (DispForm.aspx) is the display page for the workflow task, and the (ID) is current task ID, which we add this ID , like below steps (2) and (3):

Then O.K to save all changes like before, you will notice like below, that your added text converted to URL, press O.K to finish editing the sending mail action body

 

Now, repeat the above steps for the remaining email sending actions, and after finishing all, just publish your workflow:

Now test your document workflow, and notice the incoming email to you like below, the link can now open your task form to edit it, approve, reject, cancel, or reassign the task, and also from OWA too, notice that the Open this task button still appear, no way till Microsoft found a solution we can use it later J :

Advertisements

About Hossam Kamal

Hossam Kamal Senior SharePoint Developer with high development skills in C#, ASP.NET, SharePoint Server Technologies, jQuery, CSS, XML, O.O.D, SSRS and MS.SQL Server.
This entry was posted in SharePoint General. Bookmark the permalink.

23 Responses to #SharePoint, Solving Open this task problem in Outlook

  1. Hameer says:

    Thanks for the article Hossam. I am having the same problem but I cannot change the workflow. Open this task button should be working so did you ever found a workaround for that?

  2. Spencer says:

    You are the man! I ran into this issue as well with SharePoint requests being processed in Outlook with InfoPath forms not loading for some (not all) users. I also had the idea of just including the hyperlink in the e-mail to substitute for the task button but had no clue how to point it to the task display (InfoPath) form. Thanks for sharing!

    Also, I’d like to be added to any e-mail listing you may have.

  3. I solved this problem by stopping the Request Management service on my wfe

  4. szyde says:

    Thanks! This is very useful. I found out that you actually don’t need to combine the URL. It is available under:

    Data Source: Current Task: [Workflow name]
    Field: Form_URN

    Cheers.

  5. Daniel Paul says:

    Hi. I need some help with a couple of things.

    in this post your state: “/WorkflowTasks/DispForm.aspx?ID Where (WorkflowTasks) is the name of the current workflow Task list, and (DispForm.aspx) is the display page for the workflow task”

    Can you clarify this?” Who do I get the name of the current workflow task list? and how do I get the display page for the workflow task?

    Thanks,
    Dan

    • Hossam Kamal says:

      Hi Dan,
      You can find the work flow task list name from sharepoint designer, and the display page is reserved name off course it can be changed but if you didn’t change it the name is DispForm.

      Regards,

  6. Rolla says:

    Hello,

    Thank you for this quick solution.
    I’ve tried it to add the link in the workflow and it was sent in the email. but after approve or reject from the URL in the email, the page was redirected to list of all the site workflows (Lists/Workflow Tasks/AllItems.aspx).
    I tried to add (&source=http://mysite/) but it’s not working.

    • Hossam Kamal says:

      Could you please write the full URL?
      and kindly try to copy it in another browser and check again and let me know.

      • Rolla says:

        Here is the link:
        [%Workflow Context:Current Site URL%]/WorkflowTasks/DispForm.aspx?ID=[%Current Task:ID%]&Source=http://mysite/

        and I’ve tried in both Chrome and IE.

    • Hossam Kamal says:

      I think you missed adding ( /Lists/) after [%Workflow Context:Current Site URL%] try it, if not working, I advise you to add the site URL manually instead of [%Workflow Context:Current Site URL%], and let me know.

      • Rolla says:

        I have added /Lists/ and the link wasn’t opening.
        it says:
        Oops! Something’s wrong here…
        Please contact **** Support at
        Ex or Ex .

    • Hossam Kamal says:

      Please try adding site URL manually.

      • Rolla says:

        I don’t have a problem in sending the email and receive the workflow task .
        this is working with me:
        [%Workflow Context:Current Site URL%]/WorkflowTasks/DispForm.aspx?ID=[%Current Task:ID%]

        but I want after Approve or reject to redirect the page to my homepage not to all the list of workflows.

    • Hossam Kamal says:

      You may have a problem with JavaScript on your browser because it should redirect without any problem, try again what I advised regarding direct site URL.

    • Hossam Kamal says:

      Try add another URL and source parameter instead of these links, if it works please investigate you href in the WF for the link, if not, your master page may contain something prevents URL redirecting.

  7. Rolla says:

    I’ve tried in my test server and every thing is working fine. The problem is in the production servers 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s