Can i reference the URL (Display form URL) for the item which was created inside SharePoint 2013 workflow (using “Create Item” action)

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/251606

Question

I have created the following workflow 2013 inside our sharepoint online site, the workflow will get executed when the item is created inside ListA:-

enter image description here

The workflow will do these 3 steps:-

  1. Create a new item inside another list named CommentBox.
  2. Delete the item which was just created inside ListA.
  3. Send an email containing the url of the item Which was created inside the workflow, on CommentBox list.

now i am not sure if there is a way to get the URL (Display form URL) for the item which i created inside the workflow on CommentBox list?. now as shown in the above picture i tried to get the Varialbe:create, but this will actually send a number, which i think it is the GUID for the newly added item. but seems there is not a way to get the URL for the newly added item, also i am unable to manually build the url for the display form, as seems the display form will only accept the ID and not the GUID.

Also if i define the workflow to send an email on the CommentBox list(the list where the current workflow is adding the item), then the workflow will not get fired. I think the reason is that if a workflow initiate an action (create list item in my case), then this action will not cause additional workflow to be sent.. so can anyone adivce on this please? how i can get the url for the item which is created inside the workflow? Thanks

Was it helpful?

Solution

You can get the ID of the new item by using a lookup to the "CommentBox" list and then build the URL yourself.

Try this:

  1. Create variable of type "Number" named "Id" enter image description here

  2. Just after the action "Create item" put action "Set Workflow Variable". enter image description here

  3. Configure the action as below: enter image description here

  4. Now you can use the variable "Id" in your email body enter image description here

OTHER TIPS

I think it might be easier to just run a separate workflow, that is triggered when an item is created, from the other list you created the item in and be sure to add any fields (need to create columns first) from the first list that you'd need to identify where to send the email to.

Here's how you create a link, make a workflow variable and use html. Here is an example of how I send a link to add calendar items to outlook:

enter image description here

enter image description here

And here is what the email looks like: enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top