Skip to main content

Hi,  I have a simple K2 workflow attached to a SharePoint list that unltimately sends an email.  In a SharePoint Designer workflow you could grab a dynamic 'list item url' from the workflow context options and insert it into the email body text as an auto hyperlink to open the item in display mode.  The fact it was a dynamic url was useful if the list ever moved to a different location so you don;t have to go back to the workflow and change a hard coded URL.

 

Is there a way to do this in my K2 workflow? Or am I right in thinking I would need to create a manual string of the address and insert a workflow 'reference' to the item ID into the string and just use that in the email?  It's something we do a lot, so wanted to make sure I am doing it the most efficient way!

 

Hope this makes sense, Julie

I think the best approach here is to use the Environment Fields - create a new field to represent this value and you can drag that onto your e-mail. This value can be different across K2 servers to support different SharePoint lists.


Hi JulieBird,


 


I would try tbyrne777’s suggestion first. If that doesn't meet your requirements, then another option is to build a SmartBox Smartobject to store all SharePoint dynamic urls. It can be used in any workflows.


 


Option 1:


1.Add a workflow variable 'list item url'.


https://SharePoint_site_name/Lists/List1/DispForm.aspx?ID=


2. Use this workflow variable in the email step. You can use hyperlink inline function to build the SharePoint list item link. For example, Hyperlink(workflow variable List item Reference > ID)



 


Option 2


1. Create a SmartBox SmartObject to store list item url, list GUID, and other things.



2. Use the Set Data field step in the workflow to obtain list item url. This can then be used later on in the Email step.



Many thanks both, this is really helpful, Julie 🙂

Reply