8

I have created a document library in which I am now developing the workflow. I have it setup so my workflow will send emails based on certain conditions. In those emails I want to have a link back to the new document, but I cannot figure out how to do it. I have used the Absolute Encoded URL, but it takes me back to the form in the Inforpath view. I want to view it web-based from SharePoint. I am thinking I have to do something with the fields under Current Item, but cannot figure it out.

Does Anyone have a solution?

6 Answers 6

3

Your wanting your document to open up in the browser via Office Web Apps?

If so, try opening the document in browser and grabbing that URL. You can then remove the documentID and populate that via a workflow variable.

2
  • please tell us how to do that. I can grab the server relative URL, but need to buld a url that uses the external address of the document. Aug 18, 2011 at 15:46
  • This isn't a viable solution. The OP is talking about a workflow generating an email. This is an autonomous process. Dec 27, 2018 at 19:00
3

Ok...so I know this post is old, but there is actually a way to do this for document libraries (This has been tested and confirmed working in SharePoint 2013 OnPrem and SharePoint Online):

[%Workflow Context:Current Site URL%]NameOfYourLibrary/[%Current Item:Name%].[%Current Item:Type%]

The Current Item: Type lookup is actually returned as a String and is the file extension.

enter image description here

Good luck and hopefully someone finds this useful!

1
  • This answer assumes that the document is in the root of the library and not buried several folders deep, as is often the case. Using Workflow Context: Current Item URL is the standard approach.
    – Panoone
    Jun 27, 2018 at 2:50
2

Here is a link for Workflow Email to the SharePoint 2013 Form Library Form item.

[%Workflow Context:Current Site URL%]/_layouts/15/FormServer.aspx?XmlLocation=[%Workflow Context:Current Site URL%]NameOfYourLibrary/[%Current Item:Name%]&ClientInstalled=true&DefaultItemOpen=1

0

Did someone try [%Workflow Context:Current Item URL%] ?

In my case it works perfectly, I am using SharePoint 2013

enter image description here

1
  • this doesn't seem to work in SharePoint Online modern lists - it displays a form instead.
    – Fowl
    Apr 27, 2020 at 1:45
0

OK so I tried many of these and really didn't get what I wanted. Here is what I did to create a link to the current item document.

I hard coded the link so it was like this

http://ServerName/Sites/SiteName/LibraryName/[%CurrentITem:Name%].docx?Web=1

The reason I couldn't get it to work is because the file extension was not placed in any of the above solutions so adding ".docx" because it is word docs only library for me worked.

I hope this helps someone out.

-1

SharePoint 2010 and SharePoint designer 2010

You can create a workflow to send an email when a document is added in a document library by

How to create a new document library?

step 1: Click Site Actions and select (more options)

step 2: Click more options and click library

step 3: Select Document Library and write the name of the library

step 4: Click CREATE

step 5: Open SharePoint Designer 2010 and return to SharePoint 2010

step 6: Click Site Actions and Select (edit in SharePoint 2010)it will connect to SharePoint Designer 2010

SharePoint 2010 Designer

step 1:Click List and Libraries (look for the name of the document library you created)

step 2:Click on the document library(you created) and look at the left at the bottom (when you find the name workflows )

step 3:Click [new] at the left next to workflows

step 4: Write a name of workflow and chick OK

step 5: It will open where you have to instruct your workflow and you will see step 1

step 6: Click Action and Select Send an Email

step 7: Under Step 1 it will show you [Email these users] and click the these_users

step 8: It will open [Define E-mail Message ] and add details in the text-box

step 9: Click [ok]

step 10 : Click workflow settings and check at the right under start options

step 11 : Click (start workflow automatically when item is created)

step 12: Click Save and chick publish

step 13: Go back to SharePoint 2010 and refresh the SharePoint 2010.

Testing steps

step 1 : Add a new document into a Document Library and click save.

Thanks for your time.

More information: [email protected]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.