You are viewing limited content. For full access, please sign in.

Question

Question

(LF10) Find Entry ID in Workflow when shortcut is deleted

asked on April 10, 2019

Hi,

We have a Workflow that runs when a shortcut is deleted. 

We would like to find the Original Entry ID of the source document in the Workflow - is this possible? I'm sure the Entry ID of the Shortcut was the same as the Source/Original document in previous versions.

Thanks,

Dom

0 0

Replies

replied on April 10, 2019

Hi Dominic,

Use a Find Entry activity and pass it the shortcut's entry ID. In the Additional Properties area, select Shortcut Target ID.

Best,

Rob

2 0
replied on April 10, 2019

Hi Rob,

Great bit of info there - appreciate it!

The problem I have though is that the Workflow runs when the shortcut is deleted, so the Find Entry activity returns no results. 

I feel like the shortcuts used to have the same entry ID on older versions which meant I could just run a search (example below) to find the document however the shortcut ID is different.

{LF:Name="*", Type="D"} & {LF:ID=%(Entry ID)}

I may have to handle deletions using a Template field to capture the target ID before removing the shortcut. Curious to know if there is an alternative though.

0 0
replied on April 10, 2019

Oh, details--forgot that deleted entries cannot be found. I'm taking a look into the SDK right now to see if there's a way to do this via a C# script. I'll let you know if I find a solution!

0 0
replied on April 12, 2019

Hi Dominic,

I've had a bit more time to think this through. I was originally hoping to use Audit Trail, but unfortunately there are no event types for tracking the deletion of a shortcut, only for the creation of a shortcut.

With that in mind, I think your best bet is to create a SQL table that holds the document entry ID/shortcut entry ID pairs. New pairs would be added when shortcuts are created, and it would be straightforward to do this for all existing shortcuts using the method discussed above.

I'm not sure what you want to do with the originating document's entry ID, but when a shortcut is deleted, the originating entry's ID could be returned from a lookup using the starting shortcut entry ID; then, it could be sent in an email, used for search syntax, etc. Alternatively, you could add a third column to the table to track whether the shortcut was deleted, and that way you'd have a record, if that's what you need (or you could just delete the row, etc.).

Anyway, just my 2c (again).

Best,

Rob

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.